Removed tweak options and spdlog_config.h

This commit is contained in:
gabime
2024-11-30 19:55:45 +02:00
parent 21e0810791
commit 3c9963a495
14 changed files with 47 additions and 124 deletions

View File

@@ -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) {
}

View File

@@ -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) {