summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
624876c)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
- # XXX - add check for validating the configured loglevel.
+ # Gather details about supported log levels.
+ my %supported_loglevels = &Guardian::Logger::GetLogLevels();
+
+ # Check if the configured log level is valid.
+ unless (exists ($supported_loglevels{$config{LogLevel}})) {
+ return "Invalid LogLevel: $config{LogLevel}";
+ }
# The config looks good, so return nothing (no error message).
return undef
# The config looks good, so return nothing (no error message).
return undef
## This really simple function just returns the hash which
## contains all supported log levels.
#
## This really simple function just returns the hash which
## contains all supported log levels.
#
# Nothing to do, just return the loglevels hash.
return %loglevels;
}
# Nothing to do, just return the loglevels hash.
return %loglevels;
}