Branch Coverage

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


line true false branch
75 0 4 if (@_) { }
0 4 elsif (exists $self->{'prefer_integer'}) { }
114 28 0 unless $self->socket
121 0 17 if $self->socket_io and not $force
123 1 16 defined $self->socket ? :
132 14 3 unless ($sock)
135 0 14 if (@{$self->connect_error_history;} > 12)
149 2 5 if (length $self->{'pending'})
151 2 0 unless $self->socket_io
155 2 0 if ($@ or not $written) { }
167 3 4 if $socket
185 0 28 if ($self->event_time) { }
197 0 28 if (ref $msg ne "HASH")
202 0 28 if $self->tag_prefix
215 0 28 if ($self->ack) { }
228 16 12 if ($errors and length $self->pending <= $self->buffer_limit)
231 16 0 if ($errors < 12) { }
236 16 0 if (&Fluent::Logger::time() - $self->connect_error_history->[-1] < $suppress_sec)
244 10 2 if (not $self->socket_io or $self->owner_pid != $$)
250 0 2 $self->ack ? :
252 2 0 if ($written and $acked)
257 2 10 unless ($@)
263 0 10 if $sock
266 10 0 if (length $self->{'pending'} > $self->buffer_limit)
267 1 9 if (defined $self->buffer_overflow_handler) { }
9 0 elsif ($self->truncate_buffer_at_overflow) { }
270 0 1 if $self->ack
273 0 9 if $self->ack
278 10 0 if defined $error
291 0 0 unless ($s)
295 0 0 if @acks > 0 and length $buf == 0
300 0 0 if ($unique_key and ref $ack eq 'HASH') { }
301 0 0 if ($ack->{'ack'} ne $unique_key)
308 0 0 if @acks == 0
316 2 1 if (my $handler = $self->buffer_overflow_handler)
320 0 2 if (my $error = $@)
331 12 2 unless $self->socket_io
337 0 2 unless $s
341 0 2 if (not $nwrite) { }
342 0 0 if ($retry > $self->max_write_retry)