Fixed setting max log level from command line

This commit is contained in:
SChernykh
2021-08-31 11:18:40 +02:00
parent 7b197824fe
commit 8064865ba5
3 changed files with 3 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ Params::Params(int argc, char* argv[])
}
if ((strcmp(argv[i], "--loglevel") == 0) && (i + 1 < argc)) {
const int level = std::min(std::max(atoi(argv[++i]), 0), 5);
const int level = std::min(std::max(atoi(argv[++i]), 0), log::MAX_GLOBAL_LOG_LEVEL);
log::GLOBAL_LOG_LEVEL = level;
}