Branch Coverage

File:blib/lib/Log/Abstraction.pm
Coverage:90.4%

line%coveragebranch
198100TFif (scalar @_ == 1 and ref $_[0] ne 'HASH') { }
100TFelsif (my $params = Params::Get::get_params(undef, \@_)) { }
205100TFif (exists $args{'config_file'})
207100TFunless (-r $args{'config_file'})
21050TFif (my $config = 'Config::Abstraction'->new('config_dirs', [''], 'config_file', $args{'config_file'}, 'env_prefix', "${class}::")) { }
212100TFif ($config->{$class})
217100TFif ($array)
225100TFif (not defined $class) { }
100TFelsif (&Scalar::Util::blessed($class)) { }
231100TFif (my $level = $args{'level'})
234100TFunless (defined $Log::Abstraction::syslog_values{$level})
243100TFif ($args{'syslog'} and not $args{'script_name'})
24450TFunless "File::Basename"->can("basename")
24950TFunless defined $args{'script_name'}
253100TFif (defined(my $logger = $args{'logger'})) { }
100TFelsif (not $args{'file'} || $args{'array'}) { }
254100TFif (&Scalar::Util::blessed($logger) and ref $logger eq __PACKAGE__)
263100TF$args{'verbose'} ? :
267100TFif ($level) { }
268100TFif (ref $level eq "ARRAY")
272100TFunless (defined $Log::Abstraction::syslog_values{$level})
338100TFunless defined $value
351100TFunless (UNIVERSAL::isa((&CORE::GLOBAL::caller())[0], __PACKAGE__))
35550TFunless (defined $Log::Abstraction::syslog_values{$level})
359100TFif ($Log::Abstraction::syslog_values{$level} > $self->{'level'})
364100TFif (scalar @messages == 1 and ref $messages[0] eq "ARRAY")
377100TFif ($class eq __PACKAGE__)
383100TFif (my $logger = $self->{'logger'}) { }
100TFelsif ($self->{'array'}) { }
384100TFif (ref $logger eq 'CODE') { }
100TFelsif (ref $logger eq 'ARRAY') { }
100TFelsif (ref $logger eq 'HASH') { }
100TFelsif (not ref $logger) { }
50TFelsif (&Scalar::Util::blessed($logger)) { }
394100TFif (my $ctx = $self->{'ctx'})
402100TFif (my $file = $logger->{'file'})
404100TFif ($file =~ /^([^<>|*?;!`$"\0-\037]+)$/) { }
409100TFif (open my $fout, ">>", $logger->{'file'})
42050TFunless print $fout "$format\n"
424100TFif (my $array = $logger->{'array'})
42750TFif (exists $logger->{'sendmail'} and exists $logger->{'sendmail'}{'to'})
429100TFif (not defined $logger->{'sendmail'}{'level'} or $Log::Abstraction::syslog_values{$level} <= $Log::Abstraction::syslog_values{$logger->{'sendmail'}{'level'}})
432100TFif (my $min_interval = $logger->{'sendmail'}{'min_interval'})
437100TFunless ($throttled)
449100TFif (my $from = $logger->{'sendmail'}{'from'}) { }
454100TFif (my $subject = $logger->{'sendmail'}{'subject'})
468100TFif ($@)
476100TFif (my $syslog = $logger->{'syslog'})
477100TFif (not defined $syslog->{'level'} or $Log::Abstraction::syslog_values{$level} <= $syslog->{'level'})
478100TFunless ($self->{'_syslog_opened'})
483100TFif ($syslog->{'server'})
486100TFif scalar keys %{$syslog;}
496100TF$level eq 'error' ? :
500100TFif ($@)
508100TFif (my $fout = $logger->{'fd'}) { }
100TFelsif (not $logger->{'file'} || $logger->{'array'} || $logger->{'syslog'} || exists $logger->{'sendmail'} || $logger->{'fd'}) { }
52050TFunless print $fout "$format\n"
526100TFif (open my $fout, ">>", $logger)
53850TFunless print $fout "$format\n"
543100TFunless ($logger->can($level))
544100TFif ($level eq 'notice' and $logger->can('info')) { }
559100TFif ($self->{'file'})
564100TFif ($file =~ /^([^<>|*?;!`$"\0-\037]+)$/) { }
57050TFif (open my $fout, ">>", $file)
575100TFif (&blessed($self) eq __PACKAGE__) { }
58850TFunless print $fout "$format\n"
592100TFif (my $fout = $self->{'fd'})
597100TFif (&blessed($self) eq __PACKAGE__) { }
61050TFunless print $fout "$format\n"
625100TFif ($level)
626100TFunless (defined $Log::Abstraction::syslog_values{$level})
646100TF$self->{'level'} && $self->{'level'} >= $Log::Abstraction::DEBUG ? :
759100TFif scalar @_ == 0
77450TFif scalar @_ == 0
77750TFif $Log::Abstraction::syslog_values{$level} > $Log::Abstraction::WARNING
784100TFif ($@ or not $params or ref $params ne 'HASH' or not exists $params->{'warning'}) { }
78750TFunless length $warning
790100TFunless defined $warning
791100TFif (ref $warning eq "ARRAY")
796100TFif ($params and ref $params eq 'HASH' and exists $params->{'warning'}) { }
79850TFunless defined $warning
799100TFif (ref $warning eq "ARRAY")
80750TFunless length $warning
810100TFif ($self eq __PACKAGE__)
812100TFif ($Log::Abstraction::syslog_values{$level} <= $Log::Abstraction::ERROR)
822100TFif ($Log::Abstraction::syslog_values{$level} <= $Log::Abstraction::ERROR)
824100TFif ($self->{'croak_on_error'} or not defined $self->{'logger'} || defined $self->{'array'})
829100TFif ($self->{'carp_on_warn'} or not defined $self->{'logger'} || defined $self->{'array'})
839100TFif ($self->{'_syslog_opened'})