aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/daemon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/daemon.cc')
-rw-r--r--src/libstore/daemon.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index 842aef20c..6f42093d5 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -41,9 +41,10 @@ struct TunnelLogger : public Logger
Sync<State> state_;
unsigned int clientVersion;
+ bool showTrace;
TunnelLogger(FdSink & to, unsigned int clientVersion)
- : to(to), clientVersion(clientVersion) { }
+ : to(to), clientVersion(clientVersion), showTrace(false) { }
void enqueueMsg(const std::string & s)
{
@@ -78,13 +79,21 @@ struct TunnelLogger : public Logger
if (ei.level > verbosity) return;
std::stringstream oss;
- oss << ei;
+ showErrorInfo(oss, ei, false);
+ // oss << ei;
StringSink buf;
buf << STDERR_NEXT << oss.str() << "\n"; // (fs.s + "\n");
enqueueMsg(*buf.s);
}
+ bool getShowTrace() const override {
+ return showTrace;
+ }
+ void setShowTrace(bool showTrace) override {
+ this->showTrace = showTrace;
+ }
+
/* startWork() means that we're starting an operation for which we
want to send out stderr to the client. */
void startWork()