mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 11:29:01 +08:00
Major change to log_msg - contain only string_view instead of buffer
This commit is contained in:
@@ -47,7 +47,7 @@ protected:
|
||||
fmt::memory_buffer formatted;
|
||||
if (use_raw_msg_)
|
||||
{
|
||||
details::fmt_helper::append_msg(msg, formatted);
|
||||
details::fmt_helper::append_string_view(msg, formatted);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -53,12 +53,7 @@ public:
|
||||
protected:
|
||||
void sink_it_(const details::log_msg &msg) override
|
||||
{
|
||||
if (msg.c_string.data() != nullptr)
|
||||
{
|
||||
::syslog(syslog_prio_from_level(msg), "%.*s", static_cast<int>(msg.c_string.size()), msg.c_string.data());
|
||||
} else {
|
||||
::syslog(syslog_prio_from_level(msg), "%s", fmt::to_string(msg.raw).c_str());
|
||||
}
|
||||
::syslog(syslog_prio_from_level(msg), "%s", fmt::to_string(msg).c_str());
|
||||
}
|
||||
|
||||
void flush_() override {}
|
||||
|
Reference in New Issue
Block a user