Branch Coverage

blib/lib/Fluent/Logger.pm
Criterion Covered Total %
branch 44 80 55.0


line true false branch
73 0 4 if (@_) { }
0 4 elsif (exists $self->{'prefer_integer'}) { }
112 28 0 unless $self->socket
119 0 17 if $self->socket_io and not $force
121 1 16 defined $self->socket ? :
130 14 3 unless ($sock)
133 0 14 if (@{$self->connect_error_history;} > 12)
147 2 5 if (length $self->{'pending'})
149 2 0 unless $self->socket_io
153 2 0 if ($@ or not $written) { }
165 3 4 if $socket
183 0 28 if ($self->event_time) { }
195 0 28 if (ref $msg ne 'HASH')
200 0 28 if $self->tag_prefix
213 0 28 if ($self->ack) { }
226 16 12 if ($errors and length $self->pending <= $self->buffer_limit)
229 16 0 if ($errors < 12) { }
234 16 0 if (&Fluent::Logger::time() - $self->connect_error_history->[-1] < $suppress_sec)
242 10 2 if (not $self->socket_io or $self->owner_pid != $$)
248 0 2 $self->ack ? :
250 2 0 if ($written and $acked)
255 2 10 unless ($@)
261 0 10 if $sock
264 10 0 if (length $self->{'pending'} > $self->buffer_limit)
265 1 9 if (defined $self->buffer_overflow_handler) { }
9 0 elsif ($self->truncate_buffer_at_overflow) { }
268 0 1 if $self->ack
271 0 9 if $self->ack
276 10 0 if defined $error
289 0 0 unless ($s)
293 0 0 if @acks > 0 and length $buf == 0
298 0 0 if ($unique_key and ref $ack eq 'HASH') { }
299 0 0 if ($ack->{'ack'} ne $unique_key)
306 0 0 if @acks == 0
314 2 1 if (my $handler = $self->buffer_overflow_handler)
318 0 2 if (my $error = $@)
329 12 2 unless $self->socket_io
335 0 2 unless $s
339 0 2 if (not $nwrite) { }
340 0 0 if ($retry > $self->max_write_retry)