diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-08-24 22:36:40 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-08-24 22:36:40 +0200 |
commit | bb411e4ae16d6a5c61ea595c0c12e2ecee081ff9 (patch) | |
tree | 7a9163161dd3329ec7bbf5bf20d7700f718a5050 /src/libmain/loggers.cc | |
parent | 5b8a53fb4909643c61285f7728c8ee3a990d85a1 (diff) |
Fix progress bar flicker with -L
This was caused by -L calling setLogFormat() again, which caused the
creation of a new progress bar without destroying the old one. So we
had two progress bars clobbering each other.
We should change 'logger' to be a smart pointer, but I'll do that in a
future PR.
Fixes #6931.
Diffstat (limited to 'src/libmain/loggers.cc')
-rw-r--r-- | src/libmain/loggers.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libmain/loggers.cc b/src/libmain/loggers.cc index cdf23859b..cda5cb939 100644 --- a/src/libmain/loggers.cc +++ b/src/libmain/loggers.cc @@ -30,8 +30,11 @@ Logger * makeDefaultLogger() { return makeJSONLogger(*makeSimpleLogger(true)); case LogFormat::bar: return makeProgressBar(); - case LogFormat::barWithLogs: - return makeProgressBar(true); + case LogFormat::barWithLogs: { + auto logger = makeProgressBar(); + logger->setPrintBuildLogs(true); + return logger; + } default: abort(); } |