mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-27 07:14:12 +08:00
Fix #1680
This commit is contained in:
parent
32b6f1619f
commit
54a8259b42
@ -28,8 +28,11 @@ namespace cfg {
|
||||
inline void load_env_levels()
|
||||
{
|
||||
auto env_val = details::os::getenv("SPDLOG_LEVEL");
|
||||
auto levels = helpers::extract_levels(env_val);
|
||||
details::registry::instance().update_levels(std::move(levels));
|
||||
if (!env_val.empty())
|
||||
{
|
||||
auto levels = helpers::extract_levels(env_val);
|
||||
details::registry::instance().update_levels(std::move(levels));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace cfg
|
||||
|
Loading…
Reference in New Issue
Block a user