mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Fixed flush of logs in async mode
This commit is contained in:
@@ -60,9 +60,17 @@ inline spdlog::async_logger::async_logger(const std::string& logger_name,
|
||||
const async_overflow_policy overflow_policy,
|
||||
const std::function<void()>& worker_warmup_cb,
|
||||
const std::chrono::milliseconds& flush_interval_ms) :
|
||||
async_logger(logger_name, { single_sink }, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms) {}
|
||||
async_logger(logger_name, {
|
||||
single_sink
|
||||
}, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms) {}
|
||||
|
||||
|
||||
inline void spdlog::async_logger::flush()
|
||||
{
|
||||
|
||||
_async_log_helper->flush();
|
||||
}
|
||||
|
||||
inline void spdlog::async_logger::_set_formatter(spdlog::formatter_ptr msg_formatter)
|
||||
{
|
||||
_formatter = msg_formatter;
|
||||
|
Reference in New Issue
Block a user