From 8b331e2cd18ab102415bcee7339d70228fd8a412 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 563834ad..d2cd55f2 100644 --- a/include/spdlog/sinks/systemd_sink.h +++ b/include/spdlog/sinks/systemd_sink.h @@ -70,7 +70,7 @@ protected: err = (sd_journal_send)("MESSAGE=%.*s", static_cast(length), payload.data(), "PRIORITY=%d", syslog_level(msg.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 @@ protected: err = (sd_journal_send)("MESSAGE=%.*s", static_cast(length), payload.data(), "PRIORITY=%d", syslog_level(msg.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()),