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

pull/1027/head
Alexander Zvyagin 7 years ago
parent af80db8c22
commit cc98e9850d

@ -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");

Loading…
Cancel
Save