diff options
author | Yaroslav Bolyukin <iam@lach.pw> | 2021-08-22 00:26:22 +0300 |
---|---|---|
committer | Yaroslav Bolyukin <iam@lach.pw> | 2021-08-22 00:26:22 +0300 |
commit | bbb3bcb1652a2fa837e5d9e49d36876f6d9e231e (patch) | |
tree | ab724c09c32ea58553f13187a15a1aae7d0b1dd4 /src/libutil | |
parent | 7a54b10a8a29dadea2bb2c639a15cfec25a4d38c (diff) |
Replace invalid characters in json logger
Fixes #5159
Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/logging.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index 6b9b850ca..7d6090e0a 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -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 |