Fixed thread id bug in async mode by passing thread id in log_msg struct

This commit is contained in:
gabime
2015-04-07 19:57:27 +03:00
parent 69d71c52a1
commit acb06ea977
4 changed files with 14 additions and 5 deletions

View File

@@ -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;
}
};