aboutsummaryrefslogtreecommitdiff
path: root/src/libmain/loggers.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-06-05 18:20:11 +0200
committerregnat <rg@regnat.ovh>2020-06-08 09:31:15 +0200
commit4983401440e1c46d6c576bc36ac86169bd296f9f (patch)
treedc9b7483acc503a29023fc292a414c32100a0e4b /src/libmain/loggers.cc
parent2c4de6af1033367168320f43b0f04062bdac9234 (diff)
Unify the printing of the logs between bar-with-logs and raw
Make the printing of the build logs systematically go through the logger, and replicate the behavior of `no-build-output` by having two different loggers (one that prints the build logs and one that doesn't)
Diffstat (limited to 'src/libmain/loggers.cc')
-rw-r--r--src/libmain/loggers.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libmain/loggers.cc b/src/libmain/loggers.cc
index d3d5b104b..b81096931 100644
--- a/src/libmain/loggers.cc
+++ b/src/libmain/loggers.cc
@@ -8,6 +8,8 @@ LogFormat defaultLogFormat = LogFormat::raw;
LogFormat parseLogFormat(const string &logFormatStr) {
if (logFormatStr == "raw")
return LogFormat::raw;
+ else if (logFormatStr == "raw-with-logs")
+ return LogFormat::rawWithLogs;
else if (logFormatStr == "internal-json")
return LogFormat::internalJson;
else if (logFormatStr == "bar")
@@ -21,7 +23,9 @@ LogFormat parseLogFormat(const string &logFormatStr) {
Logger *makeDefaultLogger() {
switch (defaultLogFormat) {
case LogFormat::raw:
- return makeSimpleLogger();
+ return makeSimpleLogger(false);
+ case LogFormat::rawWithLogs:
+ return makeSimpleLogger(true);
case LogFormat::internalJson:
return makeJSONLogger(*makeSimpleLogger());
case LogFormat::bar: