server: logs ensure value json value does not raised error
This commit is contained in:
parent
440dd7aecd
commit
b5e44777e7
1 changed files with 2 additions and 1 deletions
|
@ -169,7 +169,8 @@ static void server_log(const char *level, const char *function, int line, const
|
|||
ss << buf;
|
||||
for (const auto& el : log.items())
|
||||
{
|
||||
snprintf(buf, 1024, " %s=%s", el.key().c_str(), el.value().dump().c_str());
|
||||
const std::string value = el.value().dump(-1, ' ', false, json::error_handler_t::replace);
|
||||
snprintf(buf, 1024, " %s=%s", el.key().c_str(), value.c_str());
|
||||
ss << buf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue