line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Log::Log4perl::Layout::PatternLayout::Stacktrace; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
76614
|
use parent 'Stacktrace::Configurable'; |
|
3
|
|
|
|
|
1138
|
|
|
3
|
|
|
|
|
19
|
|
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
153
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
93
|
|
6
|
3
|
|
|
3
|
|
155
|
use 5.01; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
152
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
8
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
79
|
|
9
|
3
|
|
|
3
|
|
3974
|
use Log::Log4perl (); |
|
3
|
|
|
|
|
245915
|
|
|
3
|
|
|
|
|
81
|
|
10
|
3
|
|
|
3
|
|
44
|
use Log::Log4perl::Layout::PatternLayout (); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
414
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub cspec { |
13
|
21
|
|
|
21
|
0
|
14848
|
our $recursion; |
14
|
21
|
100
|
|
|
|
68
|
return '(recursion detected)' if $recursion; |
15
|
15
|
|
|
|
|
23
|
local $recursion=1; |
16
|
15
|
|
|
|
|
103
|
__PACKAGE__->new(format=>$_[0]->{curlies})->get_trace->as_string; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub register_cspec { |
20
|
3
|
|
|
3
|
0
|
8
|
my $char = $_[0]; |
21
|
3
|
|
|
|
|
19
|
Log::Log4perl::Layout::PatternLayout::add_global_cspec($char, \&cspec); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub import { |
25
|
3
|
|
|
3
|
|
43
|
my ($module, %o) = @_; |
26
|
3
|
|
|
3
|
|
17
|
no warnings 'uninitialized'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
493
|
|
27
|
3
|
|
66
|
|
|
37
|
my $char = $o{-char} // $o{char} // 'S'; |
|
|
|
100
|
|
|
|
|
28
|
3
|
50
|
|
|
|
30
|
register_cspec $char if length $char == 1; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
15
|
|
|
15
|
1
|
70
|
sub skip_package_re{qr/^Log::Log4perl/} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub default_format { |
34
|
13
|
|
|
13
|
1
|
57
|
('env=L4P_STACKTRACE,'. |
35
|
|
|
|
|
|
|
'%[nr=1,n]b%[nr=1,s= ==== START STACK TRACE ===]b%[nr=1,n]b'. |
36
|
|
|
|
|
|
|
'%4b[%*n] at %f line %l%[n]b'. |
37
|
|
|
|
|
|
|
'%12b%[skip_package]s %[env=L4P_STACKTRACE_A]a'. |
38
|
|
|
|
|
|
|
'%[nr!L4P_STACKTRACE_MAX,c=%n ... %C frames cut off]b'. |
39
|
|
|
|
|
|
|
'%[nr=$,n]b%[nr=$,s= === END STACK TRACE ===]b'); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
__END__ |