Avoid unnecessary conversion of log_msg::payload to std::string.
This commit is contained in:
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…
Reference in New Issue
Block a user