mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 10:29:02 +08:00
Fixed thread id bug in async mode by passing thread id in log_msg struct
This commit is contained in:
@@ -60,6 +60,7 @@ class async_log_helper
|
||||
level::level_enum level;
|
||||
log_clock::time_point time;
|
||||
std::string txt;
|
||||
std::thread::id thread_id;
|
||||
|
||||
async_msg() = default;
|
||||
~async_msg() = default;
|
||||
@@ -99,6 +100,7 @@ async_msg(async_msg&& other) SPDLOG_NOEXCEPT:
|
||||
msg.logger_name = logger_name;
|
||||
msg.level = level;
|
||||
msg.time = time;
|
||||
msg.thread_id = thread_id;
|
||||
msg.raw << txt;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user