1
0
Fork 0

allow specification of log topics with whitespace in the argument (#3980)

For example, the following log level now does not cause a warning anymore

    v8 = trace

previously the log levels had to be specified without any whitespace around
This commit is contained in:
Jan 2017-12-11 10:33:38 +01:00 committed by GitHub
parent d1478dbcf6
commit 74347827bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -89,9 +89,12 @@ void Logger::setLogLevel(std::string const& levelName) {
return;
}
// if log level is "foo = bar", we better get rid of the whitespace
StringUtils::trimInPlace(v[0]);
bool isGeneral = v.size() == 1;
if (!isGeneral) {
StringUtils::trimInPlace(v[1]);
l = v[1];
}