Allow "err" when converting string to level

This commit is contained in:
gabime 2020-02-26 18:33:49 +02:00
parent d18f282938
commit fbf2e942a9

View File

@ -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