aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/logging.hh
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/libutil/logging.hh
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/libutil/logging.hh')
-rw-r--r--src/libutil/logging.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh
index e319790fc..e3d91e01f 100644
--- a/src/libutil/logging.hh
+++ b/src/libutil/logging.hh
@@ -65,6 +65,9 @@ public:
virtual void stop() { };
+ // Whether the logger prints the whole build log
+ virtual bool isVerbose() { return false; }
+
virtual void log(Verbosity lvl, const FormatOrString & fs) = 0;
void log(const FormatOrString & fs)
@@ -143,7 +146,7 @@ struct PushActivity
extern Logger * logger;
-Logger * makeSimpleLogger();
+Logger * makeSimpleLogger(bool printBuildLogs = true);
Logger * makeJSONLogger(Logger & prevLogger);