blib/lib/Cikl/Logging.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 88.0% 22 / 25 CC 2 SCAR 3.5
CC
2
Cov
95%
get_logger
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« blib/lib/Cikl/Models/Address/ipv4_cidr.pm ↑ Summary blib/lib/Cikl/Smrt/Fetcher.pm »
1 package Cikl::Logging;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 require Log::Log4perl;
5 1 ▶use Log::Log4perl::Level;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 require Exporter;
8  
9 1 our @ISA = qw(Exporter);
10 1 our @EXPORT = qw/get_logger/;
11  
12 1 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 1 $Log::Log4perl::DateFormat::GMTIME = 1;
19  
20 1 ▶sub get_logger {
Subroutine get_logger: called CC=2 SCAR=7.2
Pod undocumented
21 1 ▶ my $category = shift || "";
Condition50%1/2
shift() || ''
l!l
01
MC/DC0%0/1
shift() || ''
shift()
Truth table50%1/2
A
A= shift()
Aresult
11
00
22 1 return Log::Log4perl->get_logger($category);
23 }
« blib/lib/Cikl/Models/Address/ipv4_cidr.pm ↑ Summary blib/lib/Cikl/Smrt/Fetcher.pm »