Merge pull request #3902 from nextcloud/feature/log-filename-linenum

Log file name and line number
This commit is contained in:
Matthieu Gallien 2021-10-19 21:33:22 +02:00 committed by GitHub
commit 597e29ebe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,8 @@ Logger *Logger::instance()
Logger::Logger(QObject *parent)
: QObject(parent)
{
qSetMessagePattern(QStringLiteral("%{time yyyy-MM-dd hh:mm:ss:zzz} [ %{type} %{category} ]%{if-debug}\t[ %{function} ]%{endif}:\t%{message}"));
qSetMessagePattern(QStringLiteral("%{time yyyy-MM-dd hh:mm:ss:zzz} [ %{type} %{category} %{file}:%{line} "
"]%{if-debug}\t[ %{function} ]%{endif}:\t%{message}"));
_crashLog.resize(CrashLogSize);
#ifndef NO_MSG_HANDLER
qInstallMessageHandler([](QtMsgType type, const QMessageLogContext &ctx, const QString &message) {