Branch Coverage

blib/lib/Rex/Logger.pm
Criterion Covered Total %
branch 52 72 72.2


line true false branch
89 3 73 if $silent
91 23 50 if "Rex::Config"->get_log_filename or not "Rex::Config"->get_log_facility
93 0 50 if $Rex::Logger::OSNAME =~ /^MSWin/u
107 36 55 if (defined $type)
109 14 22 if ($type eq "warn")
110 22 0 if ($type eq "error")
114 4 87 if $silent
116 36 51 if (defined $type) { }
125 42 45 unless ($log_opened)
130 66 21 if ($has_syslog)
134 21 66 if ("Rex::Config"->get_log_filename)
135 0 21 unless open $log_fh, ">>", "Rex::Config"->get_log_filename
137 21 0 if $log_fh
141 18 69 if ($no_color) { }
142 18 0 if defined $main::QUIET and $main::QUIET == 2 and (defined $type and $type ne "info") or not defined $main::QUIET
152 0 69 if defined $main::QUIET and $main::QUIET == 2 and (defined $type and $type ne "info") or not defined $main::QUIET
164 42 45 if ($log_opened == 2)
171 136 6404 if $silent
172 6402 2 unless $debug
178 2 0 unless ($log_opened)
183 0 2 if ($has_syslog)
187 2 0 if ("Rex::Config"->get_log_filename)
188 0 2 unless open $log_fh, ">>", "Rex::Config"->get_log_filename
190 2 0 if $log_fh
194 0 2 if ($no_color) { }
195 0 0 unless $main::QUIET
198 0 2 unless $main::QUIET
203 2 0 if ($log_opened == 2)
224 3 72 if $silent
225 1 71 unless $log_opened
227 48 23 if ($has_syslog) { }
231 23 0 if $log_fh
246 89 0 Rex::get_current_connection() && Rex::get_current_connection()->{'conn'}->server ? :
262 0 75 if scalar @params == 0
263 34 41 if scalar grep({defined $_;} @params) == 0
265 0 41 if (exists $ENV{'REX_DEBUG_INSECURE'} and $ENV{'REX_DEBUG_INSECURE'} eq 1)