aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-08-23 11:10:55 +0200
committerGitHub <noreply@github.com>2021-08-23 11:10:55 +0200
commita93f72c0843c7ef027242f5325184aed6b96a41a (patch)
tree630bd036929eda2f932f802de00686618ea9fa8e
parent440d1ac718f9ca4a896942c45740feae3d9b1963 (diff)
parentbbb3bcb1652a2fa837e5d9e49d36876f6d9e231e (diff)
Merge pull request #5160 from CertainLach/fix/invalid-characters-in-json-logger
Replace invalid characters in json logger
-rw-r--r--src/libutil/logging.cc2
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