line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Cikl::Logging; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
4
|
|
|
|
|
|
|
require Log::Log4perl; |
5
|
1
|
|
|
1
|
|
968
|
use Log::Log4perl::Level; |
|
1
|
|
|
|
|
2053
|
|
|
1
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
our @EXPORT = qw/get_logger/; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Log::Log4perl->easy_init({ |
13
|
|
|
|
|
|
|
level => 'ERROR', |
14
|
|
|
|
|
|
|
category => "", |
15
|
|
|
|
|
|
|
layout => "[%p][%d{yyyy-MM-dd'T'HH:mm:ss}Z][%F{1}:%L]: %m%n" |
16
|
|
|
|
|
|
|
}); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$Log::Log4perl::DateFormat::GMTIME = 1; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub get_logger { |
21
|
1
|
|
50
|
1
|
0
|
12
|
my $category = shift || ""; |
22
|
1
|
|
|
|
|
13
|
return Log::Log4perl->get_logger($category); |
23
|
|
|
|
|
|
|
} |