From 6722221c32f377d2ed4327be29316c949833b67f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 31 Mar 2022 09:52:00 +0200 Subject: file logging: shorten continuation prefix While on the console, we want multi-line logs nicely aligned, when logging to a file, unique readability is enough. So we can fix the continuation prefix to a fixed string (with non-overlapping initial segment). This makes log files easier to scan and also avoids very long lines, given that the more complete message prefixes are very long. --- src/buildtool/logging/log_sink_file.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/buildtool/logging/log_sink_file.hpp b/src/buildtool/logging/log_sink_file.hpp index e731a0c1..593b07e0 100644 --- a/src/buildtool/logging/log_sink_file.hpp +++ b/src/buildtool/logging/log_sink_file.hpp @@ -105,7 +105,7 @@ class LogSinkFile final : public ILogSink { prefix = fmt::format("{} ({})", prefix, logger->Name()); } prefix = fmt::format("{}:", prefix); - auto cont_prefix = std::string(prefix.size(), ' '); + const auto* cont_prefix = " "; { std::lock_guard lock{FileMutexes().Get(file_path_)}; -- cgit v1.2.3