line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Log::ger::Plugin::Log4perl_Multi; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
4
|
|
|
|
|
|
|
our $DATE = '2020-03-11'; # DATE |
5
|
|
|
|
|
|
|
our $DIST = 'Log-ger-Like-Log4perl'; # DIST |
6
|
|
|
|
|
|
|
our $VERSION = '0.003'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
678
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
9
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use Log::ger (); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
234
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub meta { +{ |
14
|
1
|
|
|
1
|
0
|
18
|
v => 2, |
15
|
|
|
|
|
|
|
} } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub get_hooks { |
18
|
1
|
|
|
1
|
0
|
13
|
my %plugin_conf = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return { |
21
|
|
|
|
|
|
|
create_filter => [ |
22
|
|
|
|
|
|
|
__PACKAGE__, 50, |
23
|
|
|
|
|
|
|
sub { |
24
|
|
|
|
|
|
|
my $filter = sub { |
25
|
1
|
|
|
|
|
11
|
{level => shift}; |
26
|
3
|
|
|
3
|
|
1190
|
}; |
27
|
3
|
|
|
|
|
9
|
return [$filter, 0, 'log4perl_multi']; |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
], |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
create_formatter => [ |
32
|
|
|
|
|
|
|
__PACKAGE__, 50, |
33
|
|
|
|
|
|
|
sub { |
34
|
|
|
|
|
|
|
my $formatter = sub { |
35
|
1
|
|
|
|
|
4
|
shift; # level |
36
|
|
|
|
|
|
|
return |
37
|
1
|
50
|
|
|
|
3
|
join("", map { ref $_ eq 'CODE' ? ($_->()) : ($_) } @_); |
|
2
|
|
|
|
|
9
|
|
38
|
3
|
|
|
3
|
|
150
|
}; |
39
|
3
|
|
|
|
|
9
|
return [$formatter, 0, 'log4perl_multi']; |
40
|
|
|
|
|
|
|
}, |
41
|
|
|
|
|
|
|
], |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
create_routine_names => [ |
44
|
|
|
|
|
|
|
__PACKAGE__, 50, |
45
|
|
|
|
|
|
|
sub { |
46
|
3
|
|
|
3
|
|
237
|
my %hook_args = @_; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
return [{ |
49
|
3
|
|
|
|
|
13
|
logger_methods => [ |
50
|
|
|
|
|
|
|
["log", undef, "log4perl_multi", undef, "log4perl_multi"], |
51
|
|
|
|
|
|
|
], |
52
|
|
|
|
|
|
|
}, 0]; |
53
|
1
|
|
|
|
|
9
|
}], |
54
|
|
|
|
|
|
|
}; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
# ABSTRACT: Plugin to mimic Log::Log4perl (log()) |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |