mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Allow "err" when converting string to level
This commit is contained in:
parent
d18f282938
commit
fbf2e942a9
@ -34,8 +34,16 @@ SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG
|
||||
}
|
||||
level++;
|
||||
}
|
||||
// allow warn = warning before giving up
|
||||
return name == "warn" ? level::warn : level::off;
|
||||
// check also for "warn" and "err" before giving up..
|
||||
if (name == "warn")
|
||||
{
|
||||
return level::warn;
|
||||
}
|
||||
if (name == "err")
|
||||
{
|
||||
return level::err;
|
||||
}
|
||||
return level::off;
|
||||
}
|
||||
} // namespace level
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user