Added level to log_message (pandora_ha)
This commit is contained in:
parent
2e764afac7
commit
e9c5d89fdc
|
@ -49,11 +49,14 @@ my $Running = 0;
|
|||
########################################################################
|
||||
# Print the given message with a preceding timestamp.
|
||||
########################################################################
|
||||
sub log_message($$$) {
|
||||
my ($conf, $source, $message) = @_;
|
||||
sub log_message($$$;$) {
|
||||
my ($conf, $source, $message, $verbosity_level) = @_;
|
||||
|
||||
my $level = $verbosity_level;
|
||||
$level = 5 unless defined($level);
|
||||
|
||||
if (ref($conf) eq "HASH") {
|
||||
logger($conf, 'HA (' . $source . ') ' . "$message", 5);
|
||||
logger($conf, 'HA (' . $source . ') ' . "$message", $level);
|
||||
}
|
||||
|
||||
if ($source eq '') {
|
||||
|
|
Loading…
Reference in New Issue