about summary refs log tree commit diff
path: root/src/nix-daemon
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-28T17·13+0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-28T17·13+0200
commit2cc345b95f19334e7050c7203a5f6823af24344f (patch)
tree0bb381ffa64ceb59fac0ab6416e5699854c0c028 /src/nix-daemon
parentcfc813239128fc69a9228b39b5c0abb7e7a67b11 (diff)
Give activities a verbosity level again
And print them (separately from the progress bar) given sufficient -v
flags.
Diffstat (limited to 'src/nix-daemon')
-rw-r--r--src/nix-daemon/nix-daemon.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index 9f1d619e59bf..dbf301a91533 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -149,12 +149,17 @@ struct TunnelLogger : public Logger
         }
     }
 
-    void startActivity(ActivityId act, ActivityType type,
+    void startActivity(ActivityId act, Verbosity lvl, ActivityType type,
         const std::string & s, const Fields & fields, ActivityId parent) override
     {
-        if (GET_PROTOCOL_MINOR(clientVersion) < 20) return;
+        if (GET_PROTOCOL_MINOR(clientVersion) < 20) {
+            if (!s.empty())
+                log(lvl, s + "...");
+            return;
+        }
+
         StringSink buf;
-        buf << STDERR_START_ACTIVITY << act << type << s << fields << parent;
+        buf << STDERR_START_ACTIVITY << act << lvl << type << s << fields << parent;
         enqueueMsg(*buf.s);
     }