Branch Coverage

Syslog.pm
Criterion Covered Total %
branch 0 686 0.0


line true false branch
355 0 0 if ($_a =~ /^-?dump$/i) { }
0 0 elsif ($_a =~ /^-?append$/i) { }
0 0 elsif ($_a =~ /^-?ext$/i) { }
0 0 elsif ($_a =~ /^-?report$/i) { }
0 0 elsif ($_a =~ /^-?interval$/i) { }
0 0 elsif ($_a =~ /^-?rx_time$/i) { }
0 0 elsif ($_a =~ /^-?lastmsg$/i) { }
0 0 elsif ($_a =~ /^-?debug$/i) { }
0 0 elsif ($_a =~ /^-?min_date$/i) { }
0 0 elsif ($_a =~ /^-?max_date$/i) { }
0 0 elsif ($_a =~ /^-?device$/i) { }
0 0 elsif ($_a =~ /^-?tag$/i) { }
0 0 elsif ($_a =~ /^-?message$/i) { }
0 0 elsif ($_a =~ /^-?format$/i) { }
0 0 elsif ($_a =~ /^-?moreTime$/i) { }
0 0 elsif ($_a =~ /^-?parseTag$/i) { }
373 0 0 wantarray ? :
384 0 0 if ($$_this{'report'})
388 0 0 if ($$_this{'format'} ne 'bsd' and $$_this{'format'} ne 'noHost')
390 0 0 wantarray ? :
397 0 0 if ($$_this{'dump'})
400 0 0 if ($^O eq 'MSWin32') { }
401 0 0 unless ($$_this{'repository'} =~ /\\$/)
405 0 0 unless ($$_this{'repository'} =~ m[/$])
409 0 0 unless (-w $$_this{'repository'})
412 0 0 wantarray ? :
419 0 0 if ($$_this{'interval'} < 60)
424 0 0 if ($$_this{'filter_min_date'} or $$_this{'filter_max_date'})
425 0 0 if ($$_this{'filter_device'})
426 0 0 if ($$_this{'filter_tag'})
427 0 0 if ($$_this{'report'})
432 0 0 if $$_this{'filter_min_date'} or $$_this{'filter_max_date'} or $$_this{'filter_device'} or $$_this{'filter_tag'} or $$_this{'filter_message'}
437 0 0 if ($$_this{'filter_min_date'})
440 0 0 unless ($$_this{'filter_min_date_epoch'})
442 0 0 wantarray ? :
448 0 0 if ($$_this{'filter_max_date'})
451 0 0 unless ($$_this{'filter_max_date_epoch'})
453 0 0 wantarray ? :
460 0 0 if ($$_this{'filter_min_date'} and $$_this{'filter_max_date'})
462 0 0 if ($$_this{'filter_min_date_epoch'} >= $$_this{'filter_max_date_epoch'})
468 0 0 wantarray ? :
478 0 0 if ($DEBUG)
485 0 0 wantarray ? :
558 0 0 if ($_line =~ /^\s*$/)
561 0 0 wantarray ? :
567 0 0 if ($$_obj{'format'} eq 'bsd') { }
0 0 elsif ($$_obj{'format'} eq 'noHost') { }
0 0 elsif ($$_obj{'format'} eq 'self') { }
576 0 0 wantarray ? :
582 0 0 if ($_line =~ /^(\<\d{1,3}\>)?($SYSLOG_pattern)/) { }
0 0 elsif ($_line =~ /^(.+)\s+($SYSLOG_pattern)/) { }
0 0 elsif ($_line =~ /^(.+),($SYSLOG_pattern)/) { }
595 0 0 if ($$SYSLOG_href{'device'} eq '' and $$_obj{'format'} ne 'noHost')
603 0 0 if ($_preamble)
610 0 0 if ($$_obj{'rx_time'})
637 0 0 if ($$SYSLOG_href{'device'}) { }
0 0 elsif ($$SYSLOG_href{'rx_srcIP'}) { }
657 0 0 if ($$_obj{'filter'})
659 0 0 if ($$_obj{'filter_min_date_epoch'})
663 0 0 if ($$SYSLOG_href{'rx_epoch'} and $$_obj{'rx_time'}) { }
0 0 elsif ($$SYSLOG_href{'epoch'}) { }
668 0 0 if ($$SYSLOG_href{'rx_epoch'} < $$_obj{'filter_min_date_epoch'})
674 0 0 wantarray ? :
682 0 0 if ($$SYSLOG_href{'epoch'} < $$_obj{'filter_min_date_epoch'})
688 0 0 wantarray ? :
697 0 0 wantarray ? :
701 0 0 if ($$_obj{'filter_max_date_epoch'})
705 0 0 if ($$SYSLOG_href{'rx_epoch'} and $$_obj{'rx_time'}) { }
0 0 elsif ($$SYSLOG_href{'epoch'}) { }
710 0 0 if ($$SYSLOG_href{'rx_epoch'} > $$_obj{'filter_max_date_epoch'})
716 0 0 wantarray ? :
724 0 0 if ($$SYSLOG_href{'epoch'} > $$_obj{'filter_max_date_epoch'})
730 0 0 wantarray ? :
739 0 0 wantarray ? :
743 0 0 if ($$_obj{'filter_device'})
744 0 0 unless ($$SYSLOG_href{'device'} =~ /$$_obj{'filter_device'}/)
749 0 0 wantarray ? :
753 0 0 if ($$_obj{'filter_tag'})
754 0 0 unless ($$SYSLOG_href{'tag'} =~ /$$_obj{'filter_tag'}/)
759 0 0 wantarray ? :
763 0 0 if ($$_obj{'filter_message'})
764 0 0 unless ($$SYSLOG_href{'message'} =~ /$$_obj{'filter_message'}/)
767 0 0 wantarray ? :
776 0 0 if ($$_obj{'lastmsg'} and $$SYSLOG_href{'line'} =~ /last message repeated (\d+) time/) { }
783 0 0 if ($$_obj{'dump'})
785 0 0 if ($$_obj{'report'})
791 0 0 if ($$_obj{'dump'} and $$SYSLOG_href{'device'})
793 0 0 wantarray ? :
0 0 unless ($_ok)
798 0 0 if ($$_obj{'report'})
805 0 0 wantarray ? :
850 0 0 if ($_msg =~ /$SYSLOG_pattern/) { }
853 0 0 if ($$SYSLOG_href{'format'} eq 'bsd' or $$SYSLOG_href{'format'} eq 'self') { }
0 0 elsif ($$SYSLOG_href{'format'} eq 'noHost') { }
877 0 0 if ($_ret)
878 0 0 wantarray ? :
884 0 0 if ($_ret)
885 0 0 wantarray ? :
887 0 0 if ($DEBUG)
898 0 0 if ($$SYSLOG_href{'device'} =~ /(\d+\.\d+\.\d+\.\d+)\.(\d+)\.(\d+)/) { }
910 0 0 if ($_moretime)
911 0 0 if (defined $$SYSLOG_href{'timestamp'}) { }
914 0 0 if ($$SYSLOG_href{'timestamp'} =~ /[JFMASOND]\w\w\s+\d+\s(\d\d):(\d\d):(\d\d)/i)
947 0 0 wantarray ? :
0 0 if ($_ret) { }
955 0 0 if ($_parsetag) { }
956 0 0 if (defined $$SYSLOG_href{'message'}) { }
976 0 0 if ($_ret) { }
978 0 0 wantarray ? :
1009 0 0 if ($_[0] =~ /^<(\d+)>$/) { }
1020 0 0 if ($_t =~ /(\d\d\d\d)\-(\d\d)\-(\d\d)/)
1025 0 0 if ($_t =~ /(\d\d)\-(\d\d)\-(\d\d\d\d)/)
1030 0 0 if ($_t =~ /(\d\d):(\d\d):(\d\d)/)
1035 0 0 if ($_t =~ /([a-zA-Z0-9]+)\.([a-zA-Z]+)/)
1038 0 0 if ($_t =~ /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/)
1045 0 0 if (defined $_hr and defined $_day) { }
1055 0 0 if ($_prio)
1061 0 0 if ($_timestamp)
1077 0 0 if ($_srcIp)
1082 0 0 unless (defined $Syslog_Facility{$$SYSLOG_href{'rx_facility'}})
1086 0 0 unless (defined $Syslog_Severity{$$SYSLOG_href{'rx_severity'}})
1092 0 0 if ($DEBUG)
1131 0 0 if ($TAG_1 or $TAG_2 or $TAG_3)
1132 0 0 defined $TAG_1 ? :
0 0 defined $TAG_2 ? :
0 0 defined $TAG_3 ? :
1137 0 0 if ($TAG_1 and $_[0] =~ /$TAG_1/) { }
0 0 elsif ($TAG_2 and $_[0] =~ /$TAG_2/) { }
0 0 elsif ($TAG_3 and $_[0] =~ /$TAG_3/) { }
1173 0 0 if ($_[0] =~ /^(([\w\d]+)\[([\w\d]+)\]:){1,32}? *(\w+.+)/) { }
0 0 elsif ($_[0] =~ /^(([\w\d\-_]+)\W([\w\d]+)\W:){1,32}? *(\w+.+)/) { }
0 0 elsif ($_[0] =~ /^(([\w\d\-_]+)\W([\w\d]+)\W){1,32}? *(\w+.+)/) { }
0 0 elsif ($_[0] =~ /^(([\w\d\-_]+)\W([\w\d]+)\W){1,32}? *(.+)/) { }
0 0 elsif ($_[0] =~ /last message repeated (\d+) time/) { }
1287 0 0 if ($_a =~ /^-?server/) { }
0 0 elsif ($_a =~ /^-?port/) { }
0 0 elsif ($_a =~ /^-?proto/) { }
0 0 elsif ($_a =~ /^-?facility/) { }
0 0 elsif ($_a =~ /^-?severity/) { }
0 0 elsif ($_a =~ /^-?timestamp/) { }
0 0 elsif ($_a =~ /^-?device/) { }
0 0 elsif ($_a =~ /^-?tag/) { }
0 0 elsif ($_a =~ /^-?pid/) { }
0 0 elsif ($_a =~ /^-?content/) { }
0 0 elsif ($_a =~ /^-?message/) { }
0 0 elsif ($_a =~ /^-?strict/) { }
0 0 elsif ($_a =~ /^-?noHost/) { }
0 0 elsif ($_a =~ /^-?hostname/) { }
0 0 elsif ($_a =~ /^-?noTag/) { }
0 0 elsif ($_a =~ /^-?debug/) { }
1305 0 0 wantarray ? :
1308 0 0 wantarray ? :
1338 0 0 if ($_a =~ /^-?server/) { }
0 0 elsif ($_a =~ /^-?port/) { }
0 0 elsif ($_a =~ /^-?facility/) { }
0 0 elsif ($_a =~ /^-?severity/) { }
0 0 elsif ($_a =~ /^-?timestamp/) { }
0 0 elsif ($_a =~ /^-?device/) { }
0 0 elsif ($_a =~ /^-?tag/) { }
0 0 elsif ($_a =~ /^-?pid/) { }
0 0 elsif ($_a =~ /^-?content/) { }
0 0 elsif ($_a =~ /^-?message/) { }
0 0 elsif ($_a =~ /^-?strict/) { }
0 0 elsif ($_a =~ /^-?noHost/) { }
0 0 elsif ($_a =~ /^-?hostname/) { }
0 0 elsif ($_a =~ /^-?noTag/) { }
0 0 elsif ($_a =~ /^-?debug/) { }
1355 0 0 wantarray ? :
1360 0 0 unless (defined $Syslog_Facility{$$_send{'facility'}})
1362 0 0 wantarray ? :
1364 0 0 unless (defined $Syslog_Severity{$$_send{'severity'}})
1366 0 0 wantarray ? :
1384 0 0 if ($$_send{'timestamp'}) { }
1385 0 0 unless (validate_timestamp_syntax($$_send{'timestamp'}))
1387 0 0 wantarray ? :
1399 0 0 unless ($$_send{'noHost'})
1400 0 0 if ($$_send{'device'}) { }
0 0 elsif ($$_send{'hostname'}) { }
1408 0 0 if (defined $$_send{'message'}) { }
0 0 elsif (defined $$_send{'content'}) { }
1414 0 0 unless ($$_send{'noTag'})
1415 0 0 if (defined $$_send{'tag'} and $$_send{'pid'}) { }
0 0 elsif (defined $$_send{'tag'}) { }
1422 0 0 if (defined $$_send{'pid'}) { }
1442 0 0 if ($_format eq 'THTC') { }
0 0 elsif ($_format eq 'THC') { }
0 0 elsif ($_format eq 'TTC') { }
0 0 elsif ($_format eq 'TC') { }
0 0 elsif ($_format eq 'THM') { }
0 0 elsif ($_format eq 'TM') { }
1470 0 0 wantarray ? :
1481 0 0 if ($_tag =~ /(.+)\[/) { }
1486 0 0 if ($$_send{'strict'})
1488 0 0 if ($msg_l > 1024)
1490 0 0 wantarray ? :
1493 0 0 if ($tag_l > 32)
1495 0 0 wantarray ? :
1499 0 0 if ($$_send{'debug'})
1523 0 0 unless ($_sock)
1527 0 0 wantarray ? :
1532 0 0 wantarray ? :
1599 0 0 if ($_a =~ /^-?port$/) { }
0 0 elsif ($_a =~ /^-?proto$/) { }
0 0 elsif ($_a =~ /^-?maxlength$/) { }
0 0 elsif ($_a =~ /^-?packets$/) { }
0 0 elsif ($_a =~ /^-?verbose$/) { }
0 0 elsif ($_a =~ /^-?dump$/i) { }
0 0 elsif ($_a =~ /^-?append$/i) { }
0 0 elsif ($_a =~ /^-?ext$/i) { }
0 0 elsif ($_a =~ /^-?report$/i) { }
0 0 elsif ($_a =~ /^-?interval$/i) { }
0 0 elsif ($_a =~ /^-?rx_time$/i) { }
0 0 elsif ($_a =~ /^-?lastmsg$/i) { }
0 0 elsif ($_a =~ /^-?debug$/i) { }
0 0 elsif ($_a =~ /^-?min_date$/i) { }
0 0 elsif ($_a =~ /^-?max_date$/i) { }
0 0 elsif ($_a =~ /^-?device$/i) { }
0 0 elsif ($_a =~ /^-?tag$/i) { }
0 0 elsif ($_a =~ /^-?message$/i) { }
0 0 elsif ($_a =~ /^-?format$/i) { }
0 0 elsif ($_a =~ /^-?moreTime$/i) { }
0 0 elsif ($_a =~ /^-?parseTag$/i) { }
0 0 elsif ($_a =~ /^-?fwd_server/i) { }
0 0 elsif ($_a =~ /^-?fwd_port/i) { }
0 0 elsif ($_a =~ /^-?fwd_proto/i) { }
1626 0 0 wantarray ? :
1631 0 0 unless ($^O =~ /win/i)
1632 0 0 if ($$_listen{'port'} < 1024 and $> != 0)
1634 0 0 wantarray ? :
1639 0 0 if ($$_listen{'report'} or $$_listen{'verbose'} > 1)
1640 0 0 exists $$_listen{'dump'} ? :
0 0 exists $$_listen{'append'} ? :
0 0 exists $$_listen{'ext'} ? :
0 0 exists $$_listen{'report'} ? :
0 0 exists $$_listen{'interval'} ? :
0 0 exists $$_listen{'rx_time'} ? :
0 0 exists $$_listen{'lastmsg'} ? :
0 0 exists $$_listen{'debug'} ? :
0 0 exists $$_listen{'msg_plus'} ? :
0 0 exists $$_listen{'min_date'} ? :
0 0 exists $$_listen{'max_date'} ? :
0 0 exists $$_listen{'device'} ? :
0 0 exists $$_listen{'tag'} ? :
0 0 exists $$_listen{'message'} ? :
0 0 exists $$_listen{'format'} ? :
0 0 exists $$_listen{'moreTime'} ? :
0 0 exists $$_listen{'parseTag'} ? :
1660 0 0 unless ($_parse_obj)
1662 0 0 wantarray ? :
1666 0 0 if defined $$_listen{'fwd_server'}
1671 0 0 if ($_fwd)
1680 0 0 unless ($_fwd_sock)
1684 0 0 wantarray ? :
1688 0 0 $_fwd ? :
1696 0 0 unless ($_sock)
1700 0 0 wantarray ? :
1707 0 0 if ($_fwd)
1712 0 0 if ($$_listen{'verbose'})
1721 0 0 if ($$_listen{'report'} or $$_listen{'verbose'} > 1)
1723 0 0 if ($_parse) { }
1724 0 0 if ($$_listen{'verbose'} > 1)
1735 0 0 if $$_listen{'verbose'}
1740 0 0 if ($$_listen{'packets'} > 0)
1741 0 0 if ($_msg_count == $$_listen{'packets'})
1747 0 0 if $_sock
1748 0 0 if $_fwd_sock
1751 0 0 if ($$_listen{'report'} and $$_listen{'dump'})
1758 0 0 if $_fwd_sock
1761 0 0 if ($$_listen{'report'}) { }
1763 0 0 wantarray ? :
1766 0 0 wantarray ? :
1799 0 0 unless (defined $FH{$_h})
1801 0 0 if ($_[0]{'append'} == 1) { }
1802 0 0 unless open $FH{$_h}, ">>$_dstfile"
1805 0 0 unless open $FH{$_h}, ">$_dstfile"
1812 0 0 if ($ERROR)
1814 0 0 wantarray ? :
1820 0 0 wantarray ? :
1885 0 0 unless (defined $STATS{'syslog'}{'min_epoch'})
1886 0 0 unless (defined $STATS{'syslog'}{'max_epoch'})
1892 0 0 unless (defined $STATS{'device'}{$$SYSLOG_href{'device'}})
1896 0 0 unless (defined $STATS{'syslog'}{'tag'}{$_tag})
1900 0 0 unless (defined $STATS{'syslog'}{'facility'}{$_fac})
1904 0 0 unless (defined $STATS{'syslog'}{'severity'}{$_sev})
1915 0 0 if ($$SYSLOG_href{'epoch'} < $STATS{'syslog'}{'min_epoch'})
1918 0 0 if ($$SYSLOG_href{'epoch'} > $STATS{'syslog'}{'max_epoch'})
1930 0 0 unless (defined $STATS{'device'}{$$SYSLOG_href{'device'}}{'min_epoch'})
1932 0 0 unless (defined $STATS{'device'}{$$SYSLOG_href{'device'}}{'max_epoch'})
1936 0 0 if ($$SYSLOG_href{'epoch'} < $STATS{'device'}{$$SYSLOG_href{'device'}}{'min_epoch'})
1938 0 0 if ($$SYSLOG_href{'epoch'} > $STATS{'device'}{$$SYSLOG_href{'device'}}{'max_epoch'})
2065 0 0 if ($_str =~ m[([JFMASONDjfmasond]\w\w)/\d{1,2}/])
2070 0 0 if ($_str =~ m[^(\d{1,2})/(\d{1,2})/(\d{1,4}) (\d{1,2}):(\d{1,2}):(\d{1,2})$]) { }
0 0 elsif ($_str =~ m[^(\d{1,2})/(\d{1,2})/(\d{1,4}) (\d{1,2}):(\d{1,2})$]) { }
0 0 elsif ($_str =~ m[^(\d{1,2})/(\d{1,2})/(\d{1,4}) (\d{1,2})$]) { }
0 0 elsif ($_str =~ m[^(\d{1,2})/(\d{1,2})/(\d{1,4})$]) { }
2118 0 0 if ($_[0] =~ /[JFMASONDjfmasond]\w\w \d \d\d:\d\d:\d\d/) { }
0 0 elsif ($_[0] =~ /[JFMASONDjfmasond]\w\w \d\d \d\d:\d\d:\d\d/) { }
2151 0 0 unless ($_min_epoch and $_max_epoch)
2153 0 0 wantarray ? :
2156 0 0 if ($_min_epoch > $_max_epoch)
2158 0 0 wantarray ? :
2161 0 0 if ($_int < 60)
2173 0 0 wantarray ? :
2197 0 0 if ($_[0] >= $$_i[1] and $_[0] <= $$_i[2])
2221 0 0 if ($DEBUG)
2228 0 0 wantarray ? :
2248 0 0 if ($_[0] =~ /[<|>]/)
2254 0 0 if ($_p >= 0 and $_p <= 191) { }
2262 0 0 wantarray ? :
2266 0 0 wantarray ? :
2281 0 0 if ($_[0] =~ /kern/i) { }
0 0 elsif ($_[0] =~ /user/i) { }
0 0 elsif ($_[0] =~ /mail/i) { }
0 0 elsif ($_[0] =~ /daemon/i) { }
0 0 elsif ($_[0] =~ /auth/i) { }
0 0 elsif ($_[0] =~ /syslog/i) { }
0 0 elsif ($_[0] =~ /lpr/i) { }
0 0 elsif ($_[0] =~ /news/i) { }
0 0 elsif ($_[0] =~ /uucp/i) { }
0 0 elsif ($_[0] =~ /cron/i) { }
0 0 elsif ($_[0] =~ /auth/i) { }
0 0 elsif ($_[0] =~ /ftp/i) { }
0 0 elsif ($_[0] =~ /ntp/i) { }
0 0 elsif ($_[0] =~ /audit/i) { }
0 0 elsif ($_[0] =~ /alert/i) { }
0 0 elsif ($_[0] =~ /at/i) { }
0 0 elsif ($_[0] =~ /local0$/i) { }
0 0 elsif ($_[0] =~ /local1$/i) { }
0 0 elsif ($_[0] =~ /local2$/i) { }
0 0 elsif ($_[0] =~ /local3$/i) { }
0 0 elsif ($_[0] =~ /local4$/i) { }
0 0 elsif ($_[0] =~ /local5$/i) { }
0 0 elsif ($_[0] =~ /local6$/i) { }
0 0 elsif ($_[0] =~ /local7$/i) { }
2318 0 0 if ($_[0] =~ /emerg/i) { }
0 0 elsif ($_[0] =~ /alert/i) { }
0 0 elsif ($_[0] =~ /crit/i) { }
0 0 elsif ($_[0] =~ /err/i) { }
0 0 elsif ($_[0] =~ /warn/i) { }
0 0 elsif ($_[0] =~ /notice/i) { }
0 0 elsif ($_[0] =~ /info/i) { }
0 0 elsif ($_[0] =~ /debug/i) { }
2342 0 0 if ($_level <= $DEBUG)