From 35e4b679a94c3322cf1cdf2b96fd170eaa523744 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:06:00 +0100 Subject: [PATCH 1/3] Add UTC timestamps to console logs --- MatrixSDK/Utils/Logs/MXLog.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MatrixSDK/Utils/Logs/MXLog.swift b/MatrixSDK/Utils/Logs/MXLog.swift index c36bbc446d..cc84e44fb8 100644 --- a/MatrixSDK/Utils/Logs/MXLog.swift +++ b/MatrixSDK/Utils/Logs/MXLog.swift @@ -192,7 +192,7 @@ private var logger: SwiftyBeaver.Type = { let consoleDestination = ConsoleDestination() consoleDestination.useNSLog = true consoleDestination.asynchronously = false - consoleDestination.format = "$C$M $X$c" // Format is `Color Message Context`, see https://docs.swiftybeaver.com/article/20-custom-format + consoleDestination.format = "$Z $C$M $X$c" // Format is `Color Message Context`, see https://docs.swiftybeaver.com/article/20-custom-format consoleDestination.levelColor.verbose = "" consoleDestination.levelColor.debug = "" consoleDestination.levelColor.info = "" From 87b36889da79f4751f4e0ab41aad7879dc5670dc Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:09:23 +0100 Subject: [PATCH 2/3] Create 7472.change --- changelog.d/7472.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/7472.change diff --git a/changelog.d/7472.change b/changelog.d/7472.change new file mode 100644 index 0000000000..9872b968a0 --- /dev/null +++ b/changelog.d/7472.change @@ -0,0 +1 @@ +Add UTC timestamps to console log lines. From e83989fb1fc2bae131ed1810f38cd618a118a691 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Mon, 12 Aug 2024 16:46:17 +0300 Subject: [PATCH 3/3] Update format to include the time, Z cannot be applied to NSLog timestamps and doesn't do anything by itself --- MatrixSDK/Utils/Logs/MXLog.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MatrixSDK/Utils/Logs/MXLog.swift b/MatrixSDK/Utils/Logs/MXLog.swift index cc84e44fb8..615d1caa8d 100644 --- a/MatrixSDK/Utils/Logs/MXLog.swift +++ b/MatrixSDK/Utils/Logs/MXLog.swift @@ -192,7 +192,7 @@ private var logger: SwiftyBeaver.Type = { let consoleDestination = ConsoleDestination() consoleDestination.useNSLog = true consoleDestination.asynchronously = false - consoleDestination.format = "$Z $C$M $X$c" // Format is `Color Message Context`, see https://docs.swiftybeaver.com/article/20-custom-format + consoleDestination.format = "$DHH:mm:ss.SSS$d$Z $C$M $X$c" // Format is `Time Color Message Context`, see https://docs.swiftybeaver.com/article/20-custom-format consoleDestination.levelColor.verbose = "" consoleDestination.levelColor.debug = "" consoleDestination.levelColor.info = ""