libmain: add progress bar with multiple status lines
Add the log-formats `multiline` and `multiline-with-logs` which offer multiple current active building status lines. Change-Id: Idd8afe62f8591b5d8b70e258c5cefa09be4cab03
This commit is contained in:
@@ -17,6 +17,10 @@ LogFormat parseLogFormat(const std::string & logFormatStr) {
|
||||
return LogFormat::bar;
|
||||
else if (logFormatStr == "bar-with-logs")
|
||||
return LogFormat::barWithLogs;
|
||||
else if (logFormatStr == "multiline")
|
||||
return LogFormat::multiline;
|
||||
else if (logFormatStr == "multiline-with-logs")
|
||||
return LogFormat::multilineWithLogs;
|
||||
throw Error("option 'log-format' has an invalid value '%s'", logFormatStr);
|
||||
}
|
||||
|
||||
@@ -35,6 +39,17 @@ Logger * makeDefaultLogger() {
|
||||
logger->setPrintBuildLogs(true);
|
||||
return logger;
|
||||
}
|
||||
case LogFormat::multiline: {
|
||||
auto logger = makeProgressBar();
|
||||
logger->setPrintMultiline(true);
|
||||
return logger;
|
||||
}
|
||||
case LogFormat::multilineWithLogs: {
|
||||
auto logger = makeProgressBar();
|
||||
logger->setPrintMultiline(true);
|
||||
logger->setPrintBuildLogs(true);
|
||||
return logger;
|
||||
}
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user