Log file name and line number
authorFelix Weilbach <felix.weilbach@nextcloud.com>
Mon, 18 Oct 2021 12:52:21 +0000 (14:52 +0200)
committerFelix Weilbach (Rebase PR Action) <felix.weilbach@t-online.de>
Tue, 19 Oct 2021 17:10:44 +0000 (17:10 +0000)
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
src/libsync/logger.cpp

index 8aa0360c2f54b55c4f6c23a43f164fca9587db4a..5e956fbab46fea9bdb3c53920d987aa4a2b503ca 100644 (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) {