mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-15 18:22:07 +08:00
context in async factory
This commit is contained in:
parent
fbfe246075
commit
a07e0c0050
@ -24,7 +24,6 @@
|
|||||||
#include "spdlog.h"
|
#include "spdlog.h"
|
||||||
|
|
||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
|
|
||||||
namespace details {
|
namespace details {
|
||||||
static constexpr size_t default_async_q_size = 8192;
|
static constexpr size_t default_async_q_size = 8192;
|
||||||
}
|
}
|
||||||
@ -45,7 +44,6 @@ struct async_factory_impl {
|
|||||||
tp = std::make_shared<details::thread_pool>(details::default_async_q_size, 1U);
|
tp = std::make_shared<details::thread_pool>(details::default_async_q_size, 1U);
|
||||||
context->set_tp(tp);
|
context->set_tp(tp);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto sink = std::make_shared<Sink>(std::forward<SinkArgs>(args)...);
|
auto sink = std::make_shared<Sink>(std::forward<SinkArgs>(args)...);
|
||||||
auto new_logger = std::make_shared<async_logger>(std::move(logger_name), std::move(sink), std::move(tp), OverflowPolicy);
|
auto new_logger = std::make_shared<async_logger>(std::move(logger_name), std::move(sink), std::move(tp), OverflowPolicy);
|
||||||
return new_logger;
|
return new_logger;
|
||||||
|
Loading…
Reference in New Issue
Block a user