server: logs: do not truncate log values

This commit is contained in:
Pierrick HYMBERT 2024-03-02 13:49:18 +01:00
parent 18e739d61d
commit ab5b06b2cf

View file

@ -126,8 +126,7 @@ static inline void server_log(const char *level, const char *function, int line,
for (const auto& el : log.items()) for (const auto& el : log.items())
{ {
const std::string value = el.value().dump(-1, ' ', false, json::error_handler_t::replace); 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 << el.key() << "=" << value;
ss << buf;
} }
const std::string str = ss.str(); const std::string str = ss.str();