File Coverage

blib/lib/Log/Log4perl/Layout/SimpleLayout/Multiline.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             package Log::Log4perl::Layout::SimpleLayout::Multiline;
4 1     1   24869 use base qw/Log::Log4perl::Layout::SimpleLayout/;
  1         3  
  1         926  
5              
6             use strict;
7             use warnings;
8              
9             our $VERSION = '0.02';
10              
11             sub render {
12             my $self = shift;
13             my $output = $self->SUPER::render(@_);
14              
15             if ( $output =~ /([A-Z]+ - )/ ) {
16             my $spaces = ' ' x length($1);
17             $output =~ s/(\r?\n|\r)(?!$)/$1$spaces\t/g;
18             }
19              
20             $output;
21             }
22              
23             __PACKAGE__
24              
25             __END__