add string version of Logging()

This commit is contained in:
Alexey Rybalchenko
2018-05-02 15:05:39 +02:00
committed by Dennis Klein
parent 24001470e5
commit de02bd068f
2 changed files with 14 additions and 0 deletions

View File

@@ -320,6 +320,19 @@ bool Logger::Logging(Severity severity)
}
}
bool Logger::Logging(const std::string& severityStr)
{
if (fSeverityMap.count(severityStr))
{
return Logging(fSeverityMap.at(severityStr));
}
else
{
LOG(error) << "Unknown severity setting: '" << severityStr;
return false;
}
}
void Logger::SetVerbosity(const Verbosity verbosity)
{
fVerbosity = verbosity;