| Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Log/Log4perl/Layout/PatternLayout/Multiline.pm |
| Statements | Executed 4 statements in 78µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 16µs | 93µs | Log::Log4perl::Layout::PatternLayout::Multiline::BEGIN@4 |
| 0 | 0 | 0 | 0s | 0s | Log::Log4perl::Layout::PatternLayout::Multiline::render |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | #!/usr/bin/perl | ||||
| 2 | |||||
| 3 | package Log::Log4perl::Layout::PatternLayout::Multiline; | ||||
| 4 | 3 | 77µs | 2 | 93µs | # spent 93µs (16+77) within Log::Log4perl::Layout::PatternLayout::Multiline::BEGIN@4 which was called:
# once (16µs+77µs) by Log::Log4perl::Layout::BEGIN@6 at line 4 # spent 93µs making 1 call to Log::Log4perl::Layout::PatternLayout::Multiline::BEGIN@4
# spent 77µs making 1 call to base::import, recursion: max depth 1, sum of overlapping time 77µs |
| 5 | |||||
| 6 | ########################################### | ||||
| 7 | sub render { | ||||
| 8 | ########################################### | ||||
| 9 | my($self, $message, $category, $priority, $caller_level) = @_; | ||||
| 10 | |||||
| 11 | my @messages = split /\r?\n/, $message; | ||||
| 12 | |||||
| 13 | $caller_level = 0 unless defined $caller_level; | ||||
| 14 | |||||
| 15 | my $result = ''; | ||||
| 16 | |||||
| 17 | for my $msg ( @messages ) { | ||||
| 18 | $result .= $self->SUPER::render( | ||||
| 19 | $msg, $category, $priority, $caller_level + 1 | ||||
| 20 | ); | ||||
| 21 | } | ||||
| 22 | return $result; | ||||
| 23 | } | ||||
| 24 | |||||
| 25 | 1 | 2µs | 1; | ||
| 26 | |||||
| 27 | __END__ |