mirror of
https://github.com/NixOS/nix
synced 2025-07-03 10:21:47 +02:00
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)
This commit is contained in:
parent
2c4de6af10
commit
4983401440
7 changed files with 46 additions and 20 deletions
|
@ -8,6 +8,8 @@ LogFormat defaultLogFormat = LogFormat::raw;
|
|||
LogFormat parseLogFormat(const string &logFormatStr) {
|
||||
if (logFormatStr == "raw")
|
||||
return LogFormat::raw;
|
||||
else if (logFormatStr == "raw-with-logs")
|
||||
return LogFormat::rawWithLogs;
|
||||
else if (logFormatStr == "internal-json")
|
||||
return LogFormat::internalJson;
|
||||
else if (logFormatStr == "bar")
|
||||
|
@ -21,7 +23,9 @@ LogFormat parseLogFormat(const string &logFormatStr) {
|
|||
Logger *makeDefaultLogger() {
|
||||
switch (defaultLogFormat) {
|
||||
case LogFormat::raw:
|
||||
return makeSimpleLogger();
|
||||
return makeSimpleLogger(false);
|
||||
case LogFormat::rawWithLogs:
|
||||
return makeSimpleLogger(true);
|
||||
case LogFormat::internalJson:
|
||||
return makeJSONLogger(*makeSimpleLogger());
|
||||
case LogFormat::bar:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue