diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-03-31 09:52:00 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-04-04 19:31:22 +0200 |
commit | 6722221c32f377d2ed4327be29316c949833b67f (patch) | |
tree | 3e2090494b99696554ef4c21057da8ba0ff21612 /src | |
parent | 40309c0d7818aa3ea79803954068d4ba3c7a670d (diff) | |
download | justbuild-6722221c32f377d2ed4327be29316c949833b67f.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/logging/log_sink_file.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
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_)}; |