about summary refs log tree commit diff
path: root/src/libutil/logging.hh
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/libutil/logging.hh
parentcfc813239128fc69a9228b39b5c0abb7e7a67b11 (diff)
Give activities a verbosity level again
And print them (separately from the progress bar) given sufficient -v
flags.
Diffstat (limited to 'src/libutil/logging.hh')
-rw-r--r--src/libutil/logging.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh
index e3e7c8e6f330..84fffa820f4c 100644
--- a/src/libutil/logging.hh
+++ b/src/libutil/logging.hh
@@ -68,7 +68,7 @@ public:
 
     virtual void warn(const std::string & msg);
 
-    virtual void startActivity(ActivityId act, ActivityType type,
+    virtual void startActivity(ActivityId act, Verbosity lvl, ActivityType type,
         const std::string & s, const Fields & fields, ActivityId parent) { };
 
     virtual void stopActivity(ActivityId act) { };
@@ -84,9 +84,13 @@ struct Activity
 
     const ActivityId id;
 
-    Activity(Logger & logger, ActivityType type, const std::string & s = "",
+    Activity(Logger & logger, Verbosity lvl, ActivityType type, const std::string & s = "",
         const Logger::Fields & fields = {}, ActivityId parent = curActivity);
 
+    Activity(Logger & logger, ActivityType type,
+        const Logger::Fields & fields = {}, ActivityId parent = curActivity)
+        : Activity(logger, lvlError, type, "", fields, parent) { };
+
     Activity(const Activity & act) = delete;
 
     ~Activity()