Replace invalid characters in json logger

Fixes #5159

Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
This commit is contained in:
Yaroslav Bolyukin 2021-08-22 00:26:22 +03:00
parent 7a54b10a8a
commit bbb3bcb165
No known key found for this signature in database
GPG key ID: 40B5D6948143175F

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