Style fixes

This commit is contained in:
Eelco Dolstra 2020-06-08 13:24:01 +02:00
parent 4983401440
commit c27f92698b
2 changed files with 3 additions and 4 deletions

View file

@ -41,8 +41,8 @@ MixCommonArgs::MixCommonArgs(const string & programName)
addFlag({ addFlag({
.longName = "log-format", .longName = "log-format",
.description = "Format of the logs. One of \"raw\", \"internal-json\", \"bar\" " .description = "format of log output; \"raw\", \"internal-json\", \"bar\" "
"or \"bar-with-logs\".", "or \"bar-with-logs\"",
.labels = {"format"}, .labels = {"format"},
.handler = {[](std::string format) { setLogFormat(format); }}, .handler = {[](std::string format) { setLogFormat(format); }},
}); });

View file

@ -16,8 +16,7 @@ LogFormat parseLogFormat(const string &logFormatStr) {
return LogFormat::bar; return LogFormat::bar;
else if (logFormatStr == "bar-with-logs") else if (logFormatStr == "bar-with-logs")
return LogFormat::barWithLogs; return LogFormat::barWithLogs;
throw Error(format("option 'log-format' has an invalid value '%s'") % throw Error("option 'log-format' has an invalid value '%s'", logFormatStr);
logFormatStr);
} }
Logger *makeDefaultLogger() { Logger *makeDefaultLogger() {