Skip to content

Commit

Permalink
Fix wrong thread_id (TID) in systemd_sink.h (#2919)
Browse files Browse the repository at this point in the history
  • Loading branch information
M010 authored Oct 23, 2023
1 parent 2d5179b commit 8b331e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/spdlog/sinks/systemd_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class systemd_sink : public base_sink<Mutex> {
err = (sd_journal_send)("MESSAGE=%.*s", static_cast<int>(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<int>(syslog_identifier.size()),
Expand All @@ -79,7 +79,7 @@ class systemd_sink : public base_sink<Mutex> {
err = (sd_journal_send)("MESSAGE=%.*s", static_cast<int>(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<int>(syslog_identifier.size()),
Expand Down

0 comments on commit 8b331e2

Please sign in to comment.