Branch Coverage

blib/lib/Log/Tree.pm
Criterion Covered Total %
branch 45 106 42.4


line true false branch
137 1 0 unless $self->config
144 0 0 if ($self->dispatcher->output('Screen'))
168 0 0 if ($level < 0) { }
0 0 elsif ($level > 7) { }
182 0 16 if (not $sev or $sev =~ /^\d+$/)
186 9 7 if ($sev =~ /debug/i) { }
1 6 elsif ($sev =~ /info/i) { }
1 5 elsif ($sev =~ /notice/i) { }
1 4 elsif ($sev =~ /warn(?:ing)?/i) { }
1 3 elsif ($sev =~ /err(?:or)?/i) { }
1 2 elsif ($sev =~ /crit(?:ical)?/i) { }
1 1 elsif ($sev =~ /alert/i) { }
1 0 elsif ($sev =~ /emerg(?:ency)/i) { }
220 0 0 unless ($level and $level =~ /^\d+$/)
224 0 0 if ($level < 0) { }
0 0 elsif ($level > 7) { }
243 0 0 if ($min_level < 1) { }
250 0 0 if ($self->severity_to_level($line->{'level'}) >= $min_level)
280 0 8 if (@{$self->_buffer;} > 1000000)
294 0 0 unless ($name =~ /\.log$/)
297 0 0 if (-w '/var/log/') { }
309 0 1 if (-f $filename) { }
310 0 0 if (-w $filename) { }
321 1 0 if (-w $basedir) { }
336 0 1 if (IO::Interactive::Tiny::is_interactive() or $ENV{'LOG_TREE_STDOUT'})
345 0 1 if ($self->syslog and $self->facility)
356 1 0 if ($self->filename)
369 0 1 if ($self->recipients)
391 0 8 if $_[1]
398 8 8 unless @c
399 0 8 unless $c[0]
400 0 8 if $c[0] eq 'Try::Tiny'
401 0 8 unless $c[3]
402 8 0 if $c[3] eq 'Log::Tree::log'
403 0 0 if $c[3] eq 'Try::Tiny::try'
404 0 0 if $c[3] eq '(eval)'
405 0 0 if $c[3] =~ /__ANON__/
421 0 8 if ($_[1])
427 0 0 if ($min_sev)
429 0 0 if (defined $min_lvl and $_[0]->severity_to_level($_[2]) >= $min_lvl)
436 8 0 if ($min_sev)
438 8 0 if (defined $min_lvl and $_[0]->severity_to_level($_[2]) >= $min_lvl)
453 8 0 if ($package eq 'main' and $subroutine eq 'Log::Tree::log')
457 8 0 if (scalar(@_) % 2 == 0) { }
469 0 8 unless $self->_would_log($subroutine, $params{'level'})
471 8 0 unless $params{'caller'}
474 0 8 if ($params{'message'} and ref $params{'message'} eq 'CODE')
489 8 0 if ($self->prefix_level)
494 8 0 if ($self->prefix_caller)
499 0 8 if ($self->prefix)
504 8 0 if ($self->prefix_ts)
512 0 8 if ($self->suffix)
537 1 0 if ($args->{'filename'}) { }