Fixed flush of logs in async mode

This commit is contained in:
gabime
2015-11-28 15:00:19 +02:00
parent 860015ccfd
commit 06ffde6333
4 changed files with 90 additions and 26 deletions

View File

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