diff --git a/include/spdlog/sinks/systemd_sink.h b/include/spdlog/sinks/systemd_sink.h index fe748a6b..d6b9db73 100644 --- a/include/spdlog/sinks/systemd_sink.h +++ b/include/spdlog/sinks/systemd_sink.h @@ -59,8 +59,9 @@ protected: { if( sd_journal_print( syslog_level(msg.level), - "%s", - fmt::to_string(msg.payload).c_str() + "%.*s", + static_cast(msg.payload.size()), + msg.payload.data() ) ) throw spdlog_ex("Failed writing to systemd");