Commit cc98e985 authored by Alexander Zvyagin's avatar Alexander Zvyagin

Avoid unnecessary conversion of log_msg::payload to std::string.

parent af80db8c
...@@ -59,8 +59,9 @@ protected: ...@@ -59,8 +59,9 @@ protected:
{ {
if( sd_journal_print( if( sd_journal_print(
syslog_level(msg.level), syslog_level(msg.level),
"%s", "%.*s",
fmt::to_string(msg.payload).c_str() static_cast<int>(msg.payload.size()),
msg.payload.data()
) )
) )
throw spdlog_ex("Failed writing to systemd"); throw spdlog_ex("Failed writing to systemd");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment