From 99fad741ed39eb6fd7ed32e4f4107f5e8c98069d Mon Sep 17 00:00:00 2001 From: Sasha Rahlin Date: Mon, 14 Aug 2023 18:37:33 -0500 Subject: [PATCH] Print core logging messages with timestamps by default Timestamps on core logging messages are very useful for rudimentary profiling, especially for long running scripts. While the profile option for G3Pipeline.Run() provides similar functionality, it's only useful for scripts that are entirely pipeline-based, which is often not the case. Moreover, timestamps on log messages make it easy to track the progress of a script in real-time, rather than waiting until it has finished running to find out how long it took. Closes #50. --- core/src/G3PrintfLogger.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/G3PrintfLogger.cxx b/core/src/G3PrintfLogger.cxx index e523f82e..9224f510 100644 --- a/core/src/G3PrintfLogger.cxx +++ b/core/src/G3PrintfLogger.cxx @@ -4,7 +4,7 @@ #include G3PrintfLogger::G3PrintfLogger(G3LogLevel level) - : G3Logger(level), TrimFileNames(true), Timestamps(false) + : G3Logger(level), TrimFileNames(true), Timestamps(true) { tty_ = isatty(STDERR_FILENO); }