line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
################################################## |
2
|
|
|
|
|
|
|
################################################## |
3
|
|
|
|
|
|
|
# as documented in |
4
|
|
|
|
|
|
|
# http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/SimpleLayout.html |
5
|
|
|
|
|
|
|
################################################## |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use 5.006; |
8
|
70
|
|
|
70
|
|
1076
|
use strict; |
|
70
|
|
|
|
|
199
|
|
9
|
70
|
|
|
70
|
|
311
|
use warnings; |
|
70
|
|
|
|
|
115
|
|
|
70
|
|
|
|
|
4029
|
|
10
|
70
|
|
|
70
|
|
312
|
use Log::Log4perl::Level; |
|
70
|
|
|
|
|
139
|
|
|
70
|
|
|
|
|
1642
|
|
11
|
70
|
|
|
70
|
|
348
|
|
|
70
|
|
|
|
|
139
|
|
|
70
|
|
|
|
|
366
|
|
12
|
|
|
|
|
|
|
no strict qw(refs); |
13
|
70
|
|
|
70
|
|
349
|
use base qw(Log::Log4perl::Layout); |
|
70
|
|
|
|
|
138
|
|
|
70
|
|
|
|
|
1909
|
|
14
|
70
|
|
|
70
|
|
367
|
|
|
70
|
|
|
|
|
139
|
|
|
70
|
|
|
|
|
15804
|
|
15
|
|
|
|
|
|
|
################################################## |
16
|
|
|
|
|
|
|
################################################## |
17
|
|
|
|
|
|
|
my $class = shift; |
18
|
|
|
|
|
|
|
$class = ref ($class) || $class; |
19
|
99
|
|
|
99
|
0
|
175
|
|
20
|
99
|
|
33
|
|
|
329
|
my $self = { |
21
|
|
|
|
|
|
|
format => undef, |
22
|
99
|
|
|
|
|
358
|
info_needed => {}, |
23
|
|
|
|
|
|
|
stack => [], |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
bless $self, $class; |
27
|
|
|
|
|
|
|
|
28
|
99
|
|
|
|
|
188
|
return $self; |
29
|
|
|
|
|
|
|
} |
30
|
99
|
|
|
|
|
326
|
|
31
|
|
|
|
|
|
|
################################################## |
32
|
|
|
|
|
|
|
################################################## |
33
|
|
|
|
|
|
|
my($self, $message, $category, $priority, $caller_level) = @_; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
return "$priority - $message\n"; |
36
|
188
|
|
|
188
|
0
|
399
|
} |
37
|
|
|
|
|
|
|
|
38
|
188
|
|
|
|
|
542
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding utf8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Log::Log4perl::Layout::SimpleLayout - Simple Layout |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SYNOPSIS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
use Log::Log4perl::Layout::SimpleLayout; |
50
|
|
|
|
|
|
|
my $layout = Log::Log4perl::Layout::SimpleLayout->new(); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 DESCRIPTION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This class implements the C<log4j> simple layout format -- it basically |
55
|
|
|
|
|
|
|
just prints the message priority and the message, that's all. |
56
|
|
|
|
|
|
|
Check |
57
|
|
|
|
|
|
|
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/SimpleLayout.html |
58
|
|
|
|
|
|
|
for details. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SEE ALSO |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 LICENSE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Copyright 2002-2013 by Mike Schilli E<lt>m@perlmeister.comE<gt> |
65
|
|
|
|
|
|
|
and Kevin Goess E<lt>cpan@goess.orgE<gt>. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
68
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Please contribute patches to the project on Github: |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
http://github.com/mschilli/log4perl |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Send bug reports or requests for enhancements to the authors via our |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
MAILING LIST (questions, bug reports, suggestions/patches): |
79
|
|
|
|
|
|
|
log4perl-devel@lists.sourceforge.net |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Authors (please contact them via the list above, not directly): |
82
|
|
|
|
|
|
|
Mike Schilli <m@perlmeister.com>, |
83
|
|
|
|
|
|
|
Kevin Goess <cpan@goess.org> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Contributors (in alphabetical order): |
86
|
|
|
|
|
|
|
Ateeq Altaf, Cory Bennett, Jens Berthold, Jeremy Bopp, Hutton |
87
|
|
|
|
|
|
|
Davidson, Chris R. Donnelly, Matisse Enzer, Hugh Esco, Anthony |
88
|
|
|
|
|
|
|
Foiani, James FitzGibbon, Carl Franks, Dennis Gregorovic, Andy |
89
|
|
|
|
|
|
|
Grundman, Paul Harrington, Alexander Hartmaier David Hull, |
90
|
|
|
|
|
|
|
Robert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter, |
91
|
|
|
|
|
|
|
Brett Rann, Peter Rabbitson, Erik Selberg, Aaron Straup Cope, |
92
|
|
|
|
|
|
|
Lars Thegler, David Viner, Mac Yang. |
93
|
|
|
|
|
|
|
|