Branch Coverage

blib/lib/Monitoring/Availability/Logs.pm
Criterion Covered Total %
branch 50 68 73.5


line true false branch
74 57 0 if (exists $$self{$opt_key}) { }
86 19 2 if (defined $$self{'log_string'})
89 0 21 if (defined $$self{'log_file'})
92 0 21 if (defined $$self{'log_dir'})
95 0 21 if (defined $$self{'log_livestatus'})
130 0 256 if substr($_[0], 0, 1, '') ne '['
137 87 169 unless ($_[0])
155 0 46 unless defined $string
158 202 0 if defined $data
167 0 2 unless defined $file
169 0 2 unless open my $FH, '<', $file
173 54 0 if defined $data
184 0 1 unless defined $dir
186 0 1 unless opendir my $dh, $dir
188 1 2 if ($file =~ /\.log$/mox)
201 0 1 unless defined $log_array
204 11 0 if defined $data
214 3 8 if ($string eq '')
221 0 8 if ($$entry{'message'}) { }
235 55 122 if ($type eq 'SERVICE ALERT' or $type eq 'CURRENT SERVICE STATE' or $type eq 'INITIAL SERVICE STATE') { }
19 103 elsif ($type eq 'HOST ALERT' or $type eq 'CURRENT HOST STATE' or $type eq 'INITIAL HOST STATE') { }
9 94 elsif ($type eq 'HOST DOWNTIME ALERT') { }
8 86 elsif ($type eq 'SERVICE DOWNTIME ALERT') { }
6 80 elsif ($type =~ /^TIMEPERIOD\ TRANSITION/mox) { }
243 0 55 unless defined $$data{'state'}
244 53 2 $tmp[3] eq 'HARD' ? :
256 0 19 unless defined $$data{'state'}
257 19 0 $tmp[2] eq 'HARD' ? :
266 7 2 $tmp[1] eq 'STARTED' ? :
274 7 1 $tmp[2] eq 'STARTED' ? :
295 42 48 if ($$data{'type'} =~ /\ starting\.\.\./mox) { }
5 43 elsif ($$data{'type'} =~ /\ restarting\.\.\./mox) { }
25 18 elsif ($$data{'type'} =~ /shutting\ down\.\.\./mox) { }
3 15 elsif ($$data{'type'} =~ /Bailing\ out/mox) { }