mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Improve progress indicator
This commit is contained in:
parent
e80257f122
commit
b01d62285c
26 changed files with 339 additions and 168 deletions
|
@ -1,6 +1,8 @@
|
|||
#include "logging.hh"
|
||||
#include "util.hh"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace nix {
|
||||
|
||||
Logger * logger = makeDefaultLogger();
|
||||
|
@ -42,12 +44,7 @@ public:
|
|||
writeToStderr(prefix + (tty ? fs.s : filterANSIEscapes(fs.s)) + "\n");
|
||||
}
|
||||
|
||||
void startActivity(Activity & activity, Verbosity lvl, const FormatOrString & fs) override
|
||||
{
|
||||
log(lvl, fs);
|
||||
}
|
||||
|
||||
void stopActivity(Activity & activity) override
|
||||
void event(const Event & ev) override
|
||||
{
|
||||
}
|
||||
};
|
||||
|
@ -79,4 +76,8 @@ Logger * makeDefaultLogger()
|
|||
return new SimpleLogger();
|
||||
}
|
||||
|
||||
std::atomic<uint64_t> Activity::nextId{(uint64_t) getpid() << 32};
|
||||
|
||||
Activity::Activity() : id(nextId++) { };
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue