From cd8d7e6de99c3e3617f7d5a71d5a406507897393 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 13 Dec 2019 12:44:11 +0200 Subject: [PATCH] wip --- include/spdlog/cfg/env-inl.h | 2 ++ include/spdlog/details/registry-inl.h | 1 + 2 files changed, 3 insertions(+) diff --git a/include/spdlog/cfg/env-inl.h b/include/spdlog/cfg/env-inl.h index cba2fc64..7fdd23d4 100644 --- a/include/spdlog/cfg/env-inl.h +++ b/include/spdlog/cfg/env-inl.h @@ -14,6 +14,7 @@ #include #include #include +#include namespace spdlog { namespace env { @@ -96,6 +97,7 @@ inline details::registry::logger_cfgs from_env_() for (auto &name_level : levels) { auto &logger_name = name_level.first; + assert(!logger_name.empty()); auto level_name = to_lower_(name_level.second); details::registry::logger_cfg cfg; cfg.level_name = level_name; diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h index 0baf99f0..912c1237 100644 --- a/include/spdlog/details/registry-inl.h +++ b/include/spdlog/details/registry-inl.h @@ -260,6 +260,7 @@ SPDLOG_INLINE void registry::set_automatic_registration(bool automatic_registrat automatic_registration_ = automatic_registration; } + SPDLOG_INLINE void registry::set_configs(logger_cfgs configs) { std::lock_guard lock(logger_map_mutex_);