| 1 | package Irssi::Log::Log4perl; | ||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use experimental 'signatures'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use Log::Log4perl::Level; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | our $global_log_level = $DEBUG; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 0 | ▶ | sub get_logger ($cls, $logger_cls) { | ||||||||||||||||||||||||||
|
Subroutine
get_logger: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 11 | 0 | bless +{ class => $logger_cls } => __PACKAGE__ | |||||||||||||||||||||||||||
| 12 | } | ||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 0 | ▶ | sub is_trace { undef } | ||||||||||||||||||||||||||
|
Subroutine
is_trace: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 15 | 0 | ▶ | sub is_debug ($self) { ($self->{log_level} // $global_log_level) <= $DEBUG } | ||||||||||||||||||||||||||
|
Subroutine
is_debug: not called CC=2 SCAR=17.9
Pod
undocumented
Condition0%0/3
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
MC/DC0%0/2
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
$self->{"log_level"}
$Irssi::Log::Log4perl::global_log_level
Truth table0%0/3
A // B
A= $self->{"log_level"}B= $Irssi::Log::Log4perl::global_log_level
| |||||||||||||||||||||||||||||
| 16 | 0 | ▶ | sub is_info ($self) { ($self->{log_level} // $global_log_level) <= $INFO } | ||||||||||||||||||||||||||
|
Subroutine
is_info: not called CC=2 SCAR=17.9
Pod
undocumented
Condition0%0/3
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
MC/DC0%0/2
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
$self->{"log_level"}
$Irssi::Log::Log4perl::global_log_level
Truth table0%0/3
A // B
A= $self->{"log_level"}B= $Irssi::Log::Log4perl::global_log_level
| |||||||||||||||||||||||||||||
| 17 | 0 | ▶ | sub is_warn ($self) { ($self->{log_level} // $global_log_level) <= $WARN } | ||||||||||||||||||||||||||
|
Subroutine
is_warn: not called CC=2 SCAR=17.9
Pod
undocumented
Condition0%0/3
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
MC/DC0%0/2
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
$self->{"log_level"}
$Irssi::Log::Log4perl::global_log_level
Truth table0%0/3
A // B
A= $self->{"log_level"}B= $Irssi::Log::Log4perl::global_log_level
| |||||||||||||||||||||||||||||
| 18 | 0 | ▶ | sub is_error ($self) { ($self->{log_level} // $global_log_level) <= $ERROR } | ||||||||||||||||||||||||||
|
Subroutine
is_error: not called CC=2 SCAR=17.9
Pod
undocumented
Condition0%0/3
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
MC/DC0%0/2
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
$self->{"log_level"}
$Irssi::Log::Log4perl::global_log_level
Truth table0%0/3
A // B
A= $self->{"log_level"}B= $Irssi::Log::Log4perl::global_log_level
| |||||||||||||||||||||||||||||
| 19 | 0 | ▶ | sub is_fatal { 1 } | ||||||||||||||||||||||||||
|
Subroutine
is_fatal: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 0 | ▶ | sub level ($self, $level = undef) { | ||||||||||||||||||||||||||
|
Subroutine
level: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | if (ref $self) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 23 | 0 | my $old = $self->{log_level}; | |||||||||||||||||||||||||||
| 24 | 0 | ▶ | $self->{log_level} = $level | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 25 | if defined $level; | ||||||||||||||||||||||||||||
| 26 | 0 | ▶ | return $old // $global_log_level; | ||||||||||||||||||||||||||
|
Condition0%0/3
$old // $Irssi::Log::Log4perl::global_log_level
MC/DC0%0/2
$old // $Irssi::Log::Log4perl::global_log_level
$old
$Irssi::Log::Log4perl::global_log_level
Truth table0%0/3
A // B
A= $oldB= $Irssi::Log::Log4perl::global_log_level
| |||||||||||||||||||||||||||||
| 27 | } else { | ||||||||||||||||||||||||||||
| 28 | 0 | my $old = $global_log_level; | |||||||||||||||||||||||||||
| 29 | 0 | ▶ | $global_log_level = $level | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 30 | if defined $level; | ||||||||||||||||||||||||||||
| 31 | 0 | return $global_log_level; | |||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 0 | ▶ | sub trace { undef } | ||||||||||||||||||||||||||
|
Subroutine
trace: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 36 | 0 | ▶ | sub debug ($self, @message) { return unless $self->is_debug; | ||||||||||||||||||||||||||
|
Subroutine
debug: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 37 | 0 | $self->print('DEBUG', @message); } | |||||||||||||||||||||||||||
| 38 | 0 | ▶ | sub info ($self, @message) { return unless $self->is_info; | ||||||||||||||||||||||||||
|
Subroutine
info: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 39 | 0 | $self->print('INFO', @message); } | |||||||||||||||||||||||||||
| 40 | 0 | ▶ | sub warn ($self, @message) { return unless $self->is_warn; | ||||||||||||||||||||||||||
|
Subroutine
warn: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 41 | 0 | $self->print('WARN', @message); } | |||||||||||||||||||||||||||
| 42 | 0 | ▶ | sub error ($self, @message) { return unless $self->is_error; | ||||||||||||||||||||||||||
|
Subroutine
error: not called CC=2 SCAR=17.9
Pod
undocumented
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 43 | 0 | $self->print('ERROR', @message); } | |||||||||||||||||||||||||||
| 44 | 0 | ▶ | sub fatal ($self, @message) { $self->print('FATAL', @message); } | ||||||||||||||||||||||||||
|
Subroutine
fatal: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 45 | 0 | ▶ | sub log ($self, $level, @message) { | ||||||||||||||||||||||||||
|
Subroutine
log: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 46 | 0 | ▶ | return unless ($self->{log_level} // $global_log_level) <= $level; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
MC/DC0%0/2
$self->{"log_level"} // $Irssi::Log::Log4perl::global_log_level
$self->{"log_level"}
$Irssi::Log::Log4perl::global_log_level
Truth table0%0/3
A // B
A= $self->{"log_level"}B= $Irssi::Log::Log4perl::global_log_level
| |||||||||||||||||||||||||||||
| 47 | 0 | $self->print($Log::Log4perl::Level::LEVELS{ $level }, @message); | |||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | 0 | ▶ | sub print ($self, $level, @message) { | ||||||||||||||||||||||||||
|
Subroutine
print: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 51 | 0 | ▶ | print "[$level] " . ($self->{class} ? "[$self->{class}] " : "") | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 52 | . (join "", @message); | ||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | 0 | ▶ | sub logdie ($self, @message) { | ||||||||||||||||||||||||||
|
Subroutine
logdie: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 56 | 0 | $self->fatal(@message); | |||||||||||||||||||||||||||
| 57 | 0 | die; | |||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | 1 | 1; | |||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | package # | ||||||||||||||||||||||||||||
| 63 | Log::Log4perl; | ||||||||||||||||||||||||||||
| 64 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 65 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 66 | 1 | ▶ | use base 'Irssi::Log::Log4perl'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 67 | 1 | ▶ | BEGIN { $INC{'Log/Log4perl.pm'} = __FILE__; } | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||
| 69 | 0 | ▶ | sub DUMMY { 1 } | ||||||||||||||||||||||||||
|
Subroutine
DUMMY: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | 1 | 1; | |||||||||||||||||||||||||||