Fix wrong thread_id (TID) in systemd_sink.h (#2919)

This commit is contained in:
M010 2023-10-24 01:43:47 +03:00 committed by gabime
parent 83d5f3dbad
commit efcca400bf

View File

@ -70,7 +70,7 @@ protected:
err = (sd_journal_send)("MESSAGE=%.*s", static_cast<int>(length), payload.data(),
"PRIORITY=%d", syslog_level(msg.log_level),
#ifndef SPDLOG_NO_THREAD_ID
"TID=%zu", details::os::thread_id(),
"TID=%zu", msg.thread_id,
#endif
"SYSLOG_IDENTIFIER=%.*s",
static_cast<int>(syslog_identifier.size()),
@ -79,7 +79,7 @@ protected:
err = (sd_journal_send)("MESSAGE=%.*s", static_cast<int>(length), payload.data(),
"PRIORITY=%d", syslog_level(msg.log_level),
#ifndef SPDLOG_NO_THREAD_ID
"TID=%zu", details::os::thread_id(),
"TID=%zu", msg.thread_id,
#endif
"SYSLOG_IDENTIFIER=%.*s",
static_cast<int>(syslog_identifier.size()),