Skip to content

Commit

Permalink
Make Icinga exit on invalid log-severity argument
Browse files Browse the repository at this point in the history
fixes #8226
  • Loading branch information
Crunsher committed Jan 15, 2015
1 parent 1fd2f09 commit bb25e5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions icinga-app/icinga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bb25e5b

Please sign in to comment.