diff --git a/include/spdlog/details/context.h b/include/spdlog/details/context.h index 320f8413..5fdc82e1 100644 --- a/include/spdlog/details/context.h +++ b/include/spdlog/details/context.h @@ -8,12 +8,9 @@ // If user requests a non-existing logger, nullptr will be returned // This class is thread safe -#include -#include #include #include #include -#include #include #include "../common.h" diff --git a/src/details/context.cpp b/src/details/context.cpp index dd8d1923..b177c514 100644 --- a/src/details/context.cpp +++ b/src/details/context.cpp @@ -35,7 +35,7 @@ context::context() { auto color_sink = std::make_shared(); #endif const char *default_logger_name = ""; - default_logger_ = std::make_shared(default_logger_name, std::move(color_sink)); + default_logger_ = std::make_shared(default_logger_name, std::move(color_sink)); #endif // SPDLOG_DISABLE_DEFAULT_LOGGER } diff --git a/src/spdlog.cpp b/src/spdlog.cpp index d50122b0..e8db4ff4 100644 --- a/src/spdlog.cpp +++ b/src/spdlog.cpp @@ -14,12 +14,12 @@ namespace spdlog { -void set_formatter(std::unique_ptr formatter) { +void set_formatter(std::unique_ptr formatter) { default_logger_raw()->set_formatter(std::move(formatter)); } void set_pattern(std::string pattern, pattern_time_type time_type) { - set_formatter(std::make_unique(std::move(pattern), time_type)); + set_formatter(std::make_unique(std::move(pattern), time_type)); } level get_level() { return default_logger_raw()->log_level(); } @@ -35,11 +35,11 @@ void set_error_handler(void (*handler)(const std::string &msg)) { default_logger void shutdown() { details::context::instance().shutdown(); } -std::shared_ptr default_logger() { return details::context::instance().default_logger(); } +std::shared_ptr default_logger() { return details::context::instance().default_logger(); } -spdlog::logger *default_logger_raw() { return details::context::instance().get_default_raw(); } +logger *default_logger_raw() { return details::context::instance().get_default_raw(); } -void set_default_logger(std::shared_ptr default_logger) { +void set_default_logger(std::shared_ptr default_logger) { details::context::instance().set_default_logger(std::move(default_logger)); }