mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
Trivial changes from the lazy-trees branch
This commit is contained in:
parent
c4a6113800
commit
703d863a48
62 changed files with 394 additions and 248 deletions
|
@ -105,14 +105,6 @@ public:
|
|||
|
||||
Verbosity verbosity = lvlInfo;
|
||||
|
||||
void warnOnce(bool & haveWarned, const FormatOrString & fs)
|
||||
{
|
||||
if (!haveWarned) {
|
||||
warn(fs.s);
|
||||
haveWarned = true;
|
||||
}
|
||||
}
|
||||
|
||||
void writeToStderr(std::string_view s)
|
||||
{
|
||||
try {
|
||||
|
@ -130,11 +122,11 @@ Logger * makeSimpleLogger(bool printBuildLogs)
|
|||
return new SimpleLogger(printBuildLogs);
|
||||
}
|
||||
|
||||
std::atomic<uint64_t> nextId{(uint64_t) getpid() << 32};
|
||||
std::atomic<uint64_t> nextId{0};
|
||||
|
||||
Activity::Activity(Logger & logger, Verbosity lvl, ActivityType type,
|
||||
const std::string & s, const Logger::Fields & fields, ActivityId parent)
|
||||
: logger(logger), id(nextId++)
|
||||
: logger(logger), id(nextId++ + (((uint64_t) getpid()) << 32))
|
||||
{
|
||||
logger.startActivity(id, lvl, type, s, fields, parent);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue