diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-08-14T20·42+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-08-16T18·56+0200 |
commit | bf1f123b09ec7402b0565808619e11b5bfe6b16b (patch) | |
tree | d0e4c9af039b8bf05244f648907c21274ee37054 /src/libutil/logging.hh | |
parent | 0e0dcf2c7ec054f1b30629e275f53f56039b8257 (diff) |
Progress indicator: Show number of active items
Diffstat (limited to 'src/libutil/logging.hh')
-rw-r--r-- | src/libutil/logging.hh | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh index f3ff099f0cec..b6ab3d7d3b8f 100644 --- a/src/libutil/logging.hh +++ b/src/libutil/logging.hh @@ -32,8 +32,7 @@ public: Activity(ActivityType type, std::string msg = ""); ~Activity(); - template<typename... Args> - void progress(const Args & ... args) const; + void progress(uint64_t done = 0, uint64_t expected = 0, uint64_t running = 0, uint64_t failed = 0) const; }; typedef enum { @@ -146,14 +145,4 @@ void warnOnce(bool & haveWarned, const FormatOrString & fs); void writeToStderr(const string & s); -template<typename... Args> -void Activity::progress(const Args & ... args) const -{ - Event ev; - ev.type = evProgress; - ev.fields.emplace_back(id); - nop{(ev.fields.emplace_back(Event::Field(args)), 1)...}; - logger->event(ev); -} - } |