This commit is contained in:
gabime 2020-09-25 15:03:13 +03:00
parent 32b6f1619f
commit 54a8259b42

View File

@ -28,8 +28,11 @@ namespace cfg {
inline void load_env_levels() inline void load_env_levels()
{ {
auto env_val = details::os::getenv("SPDLOG_LEVEL"); auto env_val = details::os::getenv("SPDLOG_LEVEL");
auto levels = helpers::extract_levels(env_val); if (!env_val.empty())
details::registry::instance().update_levels(std::move(levels)); {
auto levels = helpers::extract_levels(env_val);
details::registry::instance().update_levels(std::move(levels));
}
} }
} // namespace cfg } // namespace cfg