From efcca400bfd2449938e821a3a7d0f6345bc55bae Mon Sep 17 00:00:00 2001 From: M010 Date: Tue, 24 Oct 2023 01:43:47 +0300 Subject: [PATCH] Fix wrong thread_id (TID) in systemd_sink.h (#2919) --- include/spdlog/sinks/systemd_sink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/sinks/systemd_sink.h b/include/spdlog/sinks/systemd_sink.h index e449a1ae9..c79c4339a 100644 --- a/include/spdlog/sinks/systemd_sink.h +++ b/include/spdlog/sinks/systemd_sink.h @@ -70,7 +70,7 @@ class systemd_sink : public base_sink { err = (sd_journal_send)("MESSAGE=%.*s", static_cast(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(syslog_identifier.size()), @@ -79,7 +79,7 @@ class systemd_sink : public base_sink { err = (sd_journal_send)("MESSAGE=%.*s", static_cast(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(syslog_identifier.size()),