Skip to content

Commit

Permalink
Update Logger.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
steveschnepp committed Jul 4, 2023
1 parent c1b1c7d commit 1cfccab
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/Munin/Common/Logger.pm
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ sub configure {
# # 5 6 7 8 9 10
# $wantarray, $evaltext, $is_require, $hints, $bitmask, $hinthash
# ) = caller($i);

sub _whoami {
# uncoverable subroutine
sub _whoami { my @c = caller(1); return $c[3] . ":" . $c[2] }
my @c = caller(1); return $c[3] . ":" . $c[2]
}
sub _whowasi { my @c = caller(2); return $c[3] . ":" . $c[2] }

sub would_log {
Expand Down Expand Up @@ -195,36 +198,43 @@ sub WARN {
}

sub WARNING {
# uncoverable subroutine
my ($message) = @_;
$log->warning($message);
}

sub ERROR {
# uncoverable subroutine
my ($message) = @_;
$log->error($message);
}

sub CRITICAL {
# uncoverable subroutine
my ($message) = @_;
$log->critical($message);
}

sub FATAL {
# uncoverable subroutine
my ($message) = @_;
$log->critical($message);
}

sub ALERT {
# uncoverable subroutine
my ($message) = @_;
$log->alert($message);
}

sub EMERGENCY {
# uncoverable subroutine
my ($message) = @_;
$log->emergency($message);
}

sub LOGCROAK {
# uncoverable subroutine
my ($message) = @_;
$log->log_and_croak( level => 'critical', message => $message );
}
Expand Down

0 comments on commit 1cfccab

Please sign in to comment.