From 01eb59ca9bf6f0fb8e2f135abdf6a3fe2792d6f7 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 16 Aug 2019 19:04:49 +0300 Subject: [PATCH] Removed spdlog::default_level and its usage in registry --- include/spdlog/details/registry-inl.h | 2 +- include/spdlog/logger-inl.h | 5 ----- include/spdlog/logger.h | 4 +--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h index ffecfedb..53f52a5a 100644 --- a/include/spdlog/details/registry-inl.h +++ b/include/spdlog/details/registry-inl.h @@ -32,7 +32,7 @@ namespace details { SPDLOG_INLINE registry::registry() : formatter_(new pattern_formatter()) - , level_(spdlog::logger::default_level()) + , level_(spdlog::level::info) { #ifndef SPDLOG_DISABLE_DEFAULT_LOGGER diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 4eb8b820..f644864c 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -86,11 +86,6 @@ SPDLOG_INLINE void logger::set_level(level::level_enum log_level) level_.store(log_level); } -SPDLOG_INLINE level::level_enum logger::default_level() -{ - return static_cast(SPDLOG_ACTIVE_LEVEL); -} - SPDLOG_INLINE level::level_enum logger::level() const { return static_cast(level_.load(std::memory_order_relaxed)); diff --git a/include/spdlog/logger.h b/include/spdlog/logger.h index 602ddb30..ea1e14a8 100644 --- a/include/spdlog/logger.h +++ b/include/spdlog/logger.h @@ -308,8 +308,6 @@ public: void set_level(level::level_enum log_level); - static level::level_enum default_level(); - level::level_enum level() const; const std::string &name() const; @@ -339,7 +337,7 @@ public: protected: std::string name_; std::vector sinks_; - spdlog::level_t level_{spdlog::logger::default_level()}; + spdlog::level_t level_{level::info}; spdlog::level_t flush_level_{level::off}; err_handler custom_err_handler_{nullptr};