diff --git a/icinga-app/icinga.cpp b/icinga-app/icinga.cpp index 9897996f4..d7d3a8608 100644 --- a/icinga-app/icinga.cpp +++ b/icinga-app/icinga.cpp @@ -255,8 +255,9 @@ int Main(void) try { logLevel = Logger::StringToSeverity(severity); } catch (std::exception&) { - /* use the default */ - Log(LogWarning, "icinga", "Invalid log level set. Using default 'information'."); + /* Inform user and exit */ + Log(LogCritical, "icinga", "Invalid log level set. Default is 'information'."); + return EXIT_FAILURE; } Logger::SetConsoleLogSeverity(logLevel);