|
|
@ -7,6 +7,7 @@
|
|
|
|
# include <spdlog/async_logger.h>
|
|
|
|
# include <spdlog/async_logger.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <spdlog/spdlog.h>
|
|
|
|
#include <spdlog/sinks/sink.h>
|
|
|
|
#include <spdlog/sinks/sink.h>
|
|
|
|
#include <spdlog/details/thread_pool.h>
|
|
|
|
#include <spdlog/details/thread_pool.h>
|
|
|
|
|
|
|
|
|
|
|
@ -66,6 +67,15 @@ SPDLOG_INLINE void spdlog::async_logger::backend_sink_it_(const details::log_msg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (auto pool_ptr = thread_pool_.lock())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
auto lost_messages = pool_ptr->overrun_counter();
|
|
|
|
|
|
|
|
if (lost_messages > 0) {
|
|
|
|
|
|
|
|
spdlog::warn("Lost {} messages.", lost_messages);
|
|
|
|
|
|
|
|
pool_ptr->reset_overrun_counter();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (should_flush_(msg))
|
|
|
|
if (should_flush_(msg))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
backend_flush_();
|
|
|
|
backend_flush_();
|
|
|
|