mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 09:59:33 +08:00
Avoid unnecessary conversion of log_msg::payload to std::string.
This commit is contained in:
@@ -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");
|
||||||
|
Reference in New Issue
Block a user