diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-11 15:45:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-11 15:45:18 +0200 |
commit | ac4d43a31bb32c1205b44d69e87606b7f54922a1 (patch) | |
tree | 692e5202bb25b33292000d6f6eb81a78a503ce74 /src/libstore/build.cc | |
parent | b9ae1bdd7a1ed8eee25fc37c97d74c1d6771778d (diff) | |
parent | dd9bb11d0d38139bb32411170403171c4c92f8cf (diff) |
Merge pull request #3073 from tweag/machine-logs
Add an option to print the logs in a machine-readable format
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 9582a9007..bdf03ff94 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1642,7 +1642,7 @@ void DerivationGoal::buildDone() worker.store.printStorePath(drvPath), statusToString(status)); - if (!settings.verboseBuild && !logTail.empty()) { + if (!logger->isVerbose() && !logTail.empty()) { msg += (format("; last %d log lines:") % logTail.size()).str(); for (auto & line : logTail) msg += "\n " + line; @@ -1691,11 +1691,7 @@ void DerivationGoal::buildDone() } void flushLine() { - if (settings.verboseBuild) { - printError("post-build-hook: " + currentLine); - } else { - act.result(resPostBuildLogLine, currentLine); - } + act.result(resPostBuildLogLine, currentLine); currentLine.clear(); } @@ -4155,13 +4151,8 @@ void DerivationGoal::flushLine() ; else { - if (settings.verboseBuild && - (settings.printRepeatedBuilds || curRound == 1)) - printError(currentLogLine); - else { - logTail.push_back(currentLogLine); - if (logTail.size() > settings.logLines) logTail.pop_front(); - } + logTail.push_back(currentLogLine); + if (logTail.size() > settings.logLines) logTail.pop_front(); act->result(resBuildLogLine, currentLogLine); } |