diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-08-14T13·28+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-08-16T18·56+0200 |
commit | c5e4404580164d3edd043e79cf72bac5bdaecb42 (patch) | |
tree | 746ac321e286e5f7495cb922690437e213a201c0 /src/libutil/logging.cc | |
parent | dffc3fe43bd3cbf95945065ee7822727b9fcea90 (diff) |
nix copy: Revive progress bar
Diffstat (limited to 'src/libutil/logging.cc')
-rw-r--r-- | src/libutil/logging.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index 43245f61c601..c11271e63007 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -80,4 +80,15 @@ std::atomic<uint64_t> nextId{(uint64_t) getpid() << 32}; Activity::Activity() : id(nextId++) { }; +Activity::Activity(ActivityType type, std::string msg) + : Activity() +{ + logger->event(evStartActivity, id, msg); +} + +Activity::~Activity() +{ + logger->event(evStopActivity, id); +} + } |