mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-27 16:09:05 +08:00
refactor
This commit is contained in:
parent
8992f36fbf
commit
9d3591dcd5
@ -79,7 +79,7 @@ SPDLOG_INLINE std::unordered_map<std::string, std::string> extract_key_vals_(con
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline details::registry::logger_levels from_string_(const std::string& input)
|
inline details::registry::logger_levels levels_from_string_(const std::string& input)
|
||||||
{
|
{
|
||||||
auto key_vals = extract_key_vals_(input);
|
auto key_vals = extract_key_vals_(input);
|
||||||
details::registry::logger_levels rv;
|
details::registry::logger_levels rv;
|
||||||
@ -110,7 +110,7 @@ inline details::registry::logger_levels from_string_(const std::string& input)
|
|||||||
|
|
||||||
SPDLOG_INLINE void load_levels()
|
SPDLOG_INLINE void load_levels()
|
||||||
{
|
{
|
||||||
auto levels = from_string_(details::os::getenv("SPDLOG_LEVEL"));
|
auto levels = levels_from_string_(details::os::getenv("SPDLOG_LEVEL"));
|
||||||
spdlog::details::registry::instance().set_levels(levels);
|
spdlog::details::registry::instance().set_levels(levels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user