mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
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.
|
# Print the given message with a preceding timestamp.
|
||||||
########################################################################
|
########################################################################
|
||||||
sub log_message($$$) {
|
sub log_message($$$;$) {
|
||||||
my ($conf, $source, $message) = @_;
|
my ($conf, $source, $message, $verbosity_level) = @_;
|
||||||
|
|
||||||
|
my $level = $verbosity_level;
|
||||||
|
$level = 5 unless defined($level);
|
||||||
|
|
||||||
if (ref($conf) eq "HASH") {
|
if (ref($conf) eq "HASH") {
|
||||||
logger($conf, 'HA (' . $source . ') ' . "$message", 5);
|
logger($conf, 'HA (' . $source . ') ' . "$message", $level);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($source eq '') {
|
if ($source eq '') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user