diff --git a/include/spdlog/sinks/async_sink.h b/include/spdlog/sinks/async_sink.h index a6a5306e..d6f2e99e 100644 --- a/include/spdlog/sinks/async_sink.h +++ b/include/spdlog/sinks/async_sink.h @@ -1,18 +1,22 @@ #pragma once -#include -#include #include +#include #include +#include #include "../details/async_log_msg.h" -#include "../details/mpmc_blocking_q.h" #include "dist_sink.h" // async_sink is a sink that sends log messages to a dist_sink in a separate thread using a queue. // The worker thread dequeues the messages and sends them to the dist_sink to perform the actual logging. // The worker thread is terminated when the async_sink is destroyed. +namespace spdlog::details { // forward declaration +template +class mpmc_blocking_queue; +} + namespace spdlog { namespace sinks { @@ -54,7 +58,7 @@ public: private: void sink_it_(const details::log_msg &msg) override; void flush_() override; - void send_message_(const async_log_msg::type msg_type, const details::log_msg &msg); + void send_message_(async_log_msg::type msg_type, const details::log_msg &msg); void worker_loop(); std::atomic overflow_policy_ = overflow_policy::block;