aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/logging.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-02-16 15:37:13 +0100
committerGitHub Enterprise <[email protected]>2026-02-16 15:37:13 +0100
commit74a5e2fb8dec43682e81a98c9677aef849ca7cc1 (patch)
tree295fddb6b008be9f9012acca069d9c18727439a5 /src/zenutil/logging.cpp
parentadd foundation for http password protection (#756) (diff)
downloadzen-74a5e2fb8dec43682e81a98c9677aef849ca7cc1.tar.xz
zen-74a5e2fb8dec43682e81a98c9677aef849ca7cc1.zip
added ResetConsoleLog (#758)
also made sure log initialization calls it to ensure the console output format is retained even if the console logger was set up before logging is initialized
Diffstat (limited to 'src/zenutil/logging.cpp')
-rw-r--r--src/zenutil/logging.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenutil/logging.cpp b/src/zenutil/logging.cpp
index 806b96d52..54ac30c5d 100644
--- a/src/zenutil/logging.cpp
+++ b/src/zenutil/logging.cpp
@@ -233,6 +233,11 @@ FinishInitializeLogging(const LoggingOptions& LogOptions)
LogOptions.LogId,
std::chrono::system_clock::now() - std::chrono::milliseconds(GetTimeSinceProcessStart()))); // default to duration prefix
+ // If the console logger was initialized before, the above will change the output format
+ // so we need to reset it
+
+ logging::ResetConsoleLog();
+
if (g_FileSink)
{
if (LogOptions.AbsLogFile.extension() == ".json")