diff options
author | regnat <rg@regnat.ovh> | 2020-06-05 17:01:02 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2020-06-08 09:31:15 +0200 |
commit | 170e86dff5724264e0d3d25b9af1bd42df6aec74 (patch) | |
tree | 194379f0539e1ce0dd004c30630dee4606ca16ca /src/libutil/logging.cc | |
parent | d558fb98f6f8ce32e5c08a36d798441f1b941ba8 (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.cc')
-rw-r--r-- | src/libutil/logging.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index 3cc4ef8f1..6aec16e58 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -18,7 +18,7 @@ void setCurActivity(const ActivityId activityId) curActivity = activityId; } -Logger * logger = makeDefaultLogger(); +Logger * logger = makeSimpleLogger(); void Logger::warn(const std::string & msg) { @@ -94,7 +94,7 @@ void writeToStderr(const string & s) } } -Logger * makeDefaultLogger() +Logger * makeSimpleLogger() { return new SimpleLogger(); } |