mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
Removed tweak options and spdlog_config.h
This commit is contained in:
@@ -15,12 +15,13 @@ log_msg::log_msg(spdlog::log_clock::time_point log_time,
|
||||
spdlog::string_view_t msg)
|
||||
: logger_name(a_logger_name),
|
||||
log_level(lvl),
|
||||
time(log_time)
|
||||
#ifndef SPDLOG_NO_THREAD_ID
|
||||
,
|
||||
thread_id(os::thread_id())
|
||||
time(log_time),
|
||||
|
||||
#ifdef SPDLOG_NO_THREAD_ID
|
||||
thread_id(0),
|
||||
#else
|
||||
thread_id(os::thread_id()),
|
||||
#endif
|
||||
,
|
||||
source(loc),
|
||||
payload(msg) {
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ thread_pool::thread_pool(size_t q_max_items, size_t threads_n)
|
||||
|
||||
// message all threads to terminate gracefully join them
|
||||
thread_pool::~thread_pool() {
|
||||
SPDLOG_TRY {
|
||||
try {
|
||||
for (size_t i = 0; i < threads_.size(); i++) {
|
||||
post_async_msg_(async_msg(async_msg_type::terminate), async_overflow_policy::block);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ thread_pool::~thread_pool() {
|
||||
t.join();
|
||||
}
|
||||
}
|
||||
SPDLOG_CATCH_STD
|
||||
catch (...) {}
|
||||
}
|
||||
|
||||
void thread_pool::post_log(async_logger_ptr &&worker_ptr, const details::log_msg &msg, async_overflow_policy overflow_policy) {
|
||||
|
||||
Reference in New Issue
Block a user