From 8a30b59dfd0c59b6f04e3768d7afc52943e19bb1 Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Tue, 27 Sep 2022 20:34:53 +0200 Subject: [PATCH] Add timestamps to logs --- src/util/log.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/util/log.cpp b/src/util/log.cpp index 3d52a11c7..45042e72e 100644 --- a/src/util/log.cpp +++ b/src/util/log.cpp @@ -77,8 +77,11 @@ void Log::Init() auto format = [is_terminal](const char *level, const char *color) { const auto timestamp = std::chrono::system_clock::now(); - return fmt::format( - "{}[{:%FT%H:%M:}{:%S}] [{}] ", is_terminal ? color : "", timestamp, timestamp.time_since_epoch(), level); + return fmt::format("{}[{:%FT%H:%M:}{:%S}] [{}] ", + is_terminal ? color : "", + timestamp, + timestamp.time_since_epoch(), + level); }; switch (level)