From eea9d6136f78ed69139a68439983cd00d16b58dd Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 3 Jun 2019 23:56:18 +0300 Subject: Moved default sync factory to seperate file to avoid cyclic includes --- include/spdlog/spdlog.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'include/spdlog/spdlog.h') diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index 56a69e4c..ce32bc6e 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -13,6 +13,7 @@ #include "spdlog/details/registry.h" #include "spdlog/logger.h" #include "spdlog/version.h" +#include "spdlog/details/synchronous_factory.h" #include #include @@ -21,19 +22,6 @@ namespace spdlog { -// Default logger factory- creates synchronous loggers -struct synchronous_factory -{ - template - static std::shared_ptr create(std::string logger_name, SinkArgs &&... args) - { - auto sink = std::make_shared(std::forward(args)...); - auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); - details::registry::instance().initialize_logger(new_logger); - return new_logger; - } -}; - using default_factory = synchronous_factory; // Create and register a logger with a templated sink type -- cgit v1.2.3