aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/logging.hh
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-06-05 17:01:02 +0200
committerregnat <rg@regnat.ovh>2020-06-08 09:31:15 +0200
commit170e86dff5724264e0d3d25b9af1bd42df6aec74 (patch)
tree194379f0539e1ce0dd004c30630dee4606ca16ca /src/libutil/logging.hh
parentd558fb98f6f8ce32e5c08a36d798441f1b941ba8 (diff)
Make the logger customisable
Add a new `--log-format` cli argument to change the format of the logs. The possible values are - raw (the default one for old-style commands) - bar (the default one for new-style commands) - bar-with-logs (equivalent to `--print-build-logs`) - internal-json (the internal machine-readable json format)
Diffstat (limited to 'src/libutil/logging.hh')
-rw-r--r--src/libutil/logging.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh
index 18c24d508..e319790fc 100644
--- a/src/libutil/logging.hh
+++ b/src/libutil/logging.hh
@@ -63,6 +63,8 @@ public:
virtual ~Logger() { }
+ virtual void stop() { };
+
virtual void log(Verbosity lvl, const FormatOrString & fs) = 0;
void log(const FormatOrString & fs)
@@ -141,7 +143,7 @@ struct PushActivity
extern Logger * logger;
-Logger * makeDefaultLogger();
+Logger * makeSimpleLogger();
Logger * makeJSONLogger(Logger & prevLogger);