Merge pull request #5160 from CertainLach/fix/invalid-characters-in-json-logger

Replace invalid characters in json logger
This commit is contained in:
Eelco Dolstra 2021-08-23 11:10:55 +02:00 committed by GitHub
commit a93f72c084
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -163,7 +163,7 @@ struct JSONLogger : Logger {
void write(const nlohmann::json & json)
{
prevLogger.log(lvlError, "@nix " + json.dump());
prevLogger.log(lvlError, "@nix " + json.dump(-1, ' ', false, nlohmann::json::error_handler_t::replace));
}
void log(Verbosity lvl, const FormatOrString & fs) override