From ec72ca1961429d34fb391a19a16dbb16791c4d27 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 21 Aug 2020 02:28:56 +0100 Subject: fix(tvix): Add newlines to build logs .. turns out producing an entire build log on a single line is not useful. This does not use `<< std::endl` because we have run into buffering issues with the implementation of the logs->gRPC sink, but intend to replace this in the future using a structured sink for BuildEvent protos rather than a raw stream. Change-Id: Ia9b05fa804391d389e2ef53ab4436c0ec5cc452e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1828 Reviewed-by: glittershark Tested-by: BuildkiteCI --- third_party/nix/src/libstore/build.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'third_party') diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc index 60890732e9..83aea3899e 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_sink_ << msg << "[" << drvPath << "]"; + log_sink_ << absl::StrCat(msg, "[", drvPath, "]\n"); mcRunningBuilds = std::make_unique>(worker.runningBuilds); }; @@ -3835,7 +3835,7 @@ void DerivationGoal::handleEOF(int /* fd */) { void DerivationGoal::flushLine() { if (settings.verboseBuild && (settings.printRepeatedBuilds || curRound == 1)) { - log_sink_ << currentLogLine; + log_sink_ << absl::StrCat(currentLogLine, "\n"); } else { logTail.push_back(currentLogLine); if (logTail.size() > settings.logLines) { -- cgit 1.4.1