diff options
author | Vincent Ambo <mail@tazj.in> | 2020-08-21T00·53+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-08-21T00·57+0000 |
commit | 262af89f81eda6ce26845563141481d447e04a06 (patch) | |
tree | bcc7834e2e44c77111276c4257e7531964c77bb3 /third_party/nix/src | |
parent | e08f36c32f4363a0e3fddafb588bc6256d614e81 (diff) |
feat(tvix): Write build logs into the build log sink r/1697
This *should* wire up the builder's logs all the way back through the gRPC client, where they are then conveniently discarded. Change-Id: I65f22526d0b5a8b8d90f28665bc1b4bc7f7c802a Reviewed-on: https://cl.tvl.fyi/c/depot/+/1825 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to 'third_party/nix/src')
-rw-r--r-- | third_party/nix/src/libstore/build.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc index bdcb7a69f4dc..60890732e965 100644 --- a/third_party/nix/src/libstore/build.cc +++ b/third_party/nix/src/libstore/build.cc @@ -1473,7 +1473,7 @@ void DerivationGoal::tryToBuild() { if (hook) { msg += fmt(" on '%s'", machineName); } - LOG(INFO) << msg << "[" << drvPath << "]"; + log_sink_ << msg << "[" << drvPath << "]"; mcRunningBuilds = std::make_unique<MaintainCount<uint64_t>>(worker.runningBuilds); }; @@ -3782,6 +3782,7 @@ void DerivationGoal::deleteTmpDir(bool force) { } } +// TODO(tazjin): What ... what does this function ... do? void DerivationGoal::handleChildOutput(int fd, const std::string& data) { if ((hook && fd == hook->builderOut.readSide.get()) || (!hook && fd == builderOut.readSide.get())) { @@ -3824,7 +3825,7 @@ void DerivationGoal::handleChildOutput(int fd, const std::string& data) { } } -void DerivationGoal::handleEOF(int fd) { +void DerivationGoal::handleEOF(int /* fd */) { if (!currentLogLine.empty()) { flushLine(); } @@ -3834,7 +3835,7 @@ void DerivationGoal::handleEOF(int fd) { void DerivationGoal::flushLine() { if (settings.verboseBuild && (settings.printRepeatedBuilds || curRound == 1)) { - LOG(INFO) << currentLogLine; + log_sink_ << currentLogLine; } else { logTail.push_back(currentLogLine); if (logTail.size() > settings.logLines) { |