mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
Remove FormatOrString and remaining uses of format()
This commit is contained in:
parent
b9370fd7a0
commit
29abc8e764
40 changed files with 102 additions and 125 deletions
|
@ -54,7 +54,7 @@ public:
|
|||
return printBuildLogs;
|
||||
}
|
||||
|
||||
void log(Verbosity lvl, const FormatOrString & fs) override
|
||||
void log(Verbosity lvl, std::string_view s) override
|
||||
{
|
||||
if (lvl > verbosity) return;
|
||||
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
prefix = std::string("<") + c + ">";
|
||||
}
|
||||
|
||||
writeToStderr(prefix + filterANSIEscapes(fs.s, !tty) + "\n");
|
||||
writeToStderr(prefix + filterANSIEscapes(s, !tty) + "\n");
|
||||
}
|
||||
|
||||
void logEI(const ErrorInfo & ei) override
|
||||
|
@ -174,12 +174,12 @@ struct JSONLogger : Logger {
|
|||
prevLogger.log(lvlError, "@nix " + json.dump(-1, ' ', false, nlohmann::json::error_handler_t::replace));
|
||||
}
|
||||
|
||||
void log(Verbosity lvl, const FormatOrString & fs) override
|
||||
void log(Verbosity lvl, std::string_view s) override
|
||||
{
|
||||
nlohmann::json json;
|
||||
json["action"] = "msg";
|
||||
json["level"] = lvl;
|
||||
json["msg"] = fs.s;
|
||||
json["msg"] = s;
|
||||
write(json);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue