aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-04-19 17:16:51 -0600
committerBen Burdette <bburdette@gmail.com>2020-04-19 17:16:51 -0600
commit15e9564fd1e11b3797f0188a494aa66d4622dfb0 (patch)
tree48f6886d73497e8567cfc996c3f485712a2b65f3
parent4697552948b4d9b958b0e8f8ff1b68b5e9608e4e (diff)
logEI for tunnelLogger and progressbar
-rw-r--r--src/libstore/daemon.cc8
-rw-r--r--src/nix/progress-bar.cc6
2 files changed, 13 insertions, 1 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index c8daef57c..d985f151b 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -75,6 +75,14 @@ struct TunnelLogger : public Logger
void logEI(const ErrorInfo & ei) override
{
+ if (ei.level > verbosity) return;
+
+ std::stringstream oss;
+ oss << ei;
+
+ StringSink buf;
+ buf << STDERR_NEXT << oss.str() << "\n"; // (fs.s + "\n");
+ enqueueMsg(*buf.s);
}
/* startWork() means that we're starting an operation for which we
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc
index 41f3d4cd7..b1226d550 100644
--- a/src/nix/progress-bar.cc
+++ b/src/nix/progress-bar.cc
@@ -127,7 +127,11 @@ public:
void logEI(const ErrorInfo &ei) override
{
auto state(state_.lock());
- // log(*state, lvl, ei.as_str());
+
+ std::stringstream oss;
+ oss << ei;
+
+ log(*state, ei.level, oss.str());
}
void log(State & state, Verbosity lvl, const std::string & s)