src: Add additional log levels
refs: #1935
Change-Id: Ie3ef3f04fbcadd8fb9ee6f3aade4a35bd2a88105
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index 5f3c147..726d2af 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -189,13 +189,15 @@
}
try {
+
std::string logLevel = section.get<string>("log-level");
- if ( boost::iequals(logLevel, "info") || boost::iequals(logLevel, "debug")) {
+
+ if (isValidLogLevel(logLevel)) {
m_nlsr.getConfParameter().setLogLevel(logLevel);
}
else {
- std::cerr << "Wrong value for log-level ";
- std::cerr << "Allowed value: INFO, DEBUG" << std::endl;
+ std::cerr << "Invalid value for log-level ";
+ std::cerr << "Valid values: ALL, TRACE, DEBUG, INFO, WARN, ERROR, NONE" << std::endl;
return false;
}
}