aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-06-05 18:20:11 +0200
committerregnat <rg@regnat.ovh>2020-06-08 09:31:15 +0200
commit4983401440e1c46d6c576bc36ac86169bd296f9f (patch)
treedc9b7483acc503a29023fc292a414c32100a0e4b /src/libstore
parent2c4de6af1033367168320f43b0f04062bdac9234 (diff)
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)
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index f5c132a83..2d022093c 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);
}