Commit 54a8259b authored by gabime's avatar gabime

Fix #1680

parent 32b6f161
...@@ -28,8 +28,11 @@ namespace cfg { ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment