about summary refs log tree commit diff
path: root/src/libutil/logging.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-25T12·53+0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-25T13·58+0200
commit0e9ddcc306f0900fc38472a2c8b9d9aa886b279e (patch)
tree564883e41ee9aee98ec1bdceed43f7d2be8f905b /src/libutil/logging.cc
parent1f56235438984d8079159d7c81ad4127c318b2dc (diff)
Restore activity metadata
This allows the progress bar to display "building perl-5.22.3" instead
of "building /nix/store/<hash>-perl-5.22.3.drv".
Diffstat (limited to 'src/libutil/logging.cc')
-rw-r--r--src/libutil/logging.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc
index 900f24e4cbdf..87f20664ef08 100644
--- a/src/libutil/logging.cc
+++ b/src/libutil/logging.cc
@@ -74,10 +74,11 @@ Logger * makeDefaultLogger()
 
 std::atomic<uint64_t> nextId{(uint64_t) getpid() << 32};
 
-Activity::Activity(Logger & logger, ActivityType type, const std::string & s)
+Activity::Activity(Logger & logger, ActivityType type,
+    const std::string & s, const Logger::Fields & fields)
     : logger(logger), id(nextId++)
 {
-    logger.startActivity(id, type, s);
+    logger.startActivity(id, type, s, fields);
 }
 
 }