Log4perl/Layout/SimpleLayout.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 2 totaltotal 85.0% 34 / 40 CC 2 SCAR 2.1
CC
2
Cov
93%
new
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Log4perl/Filter/LevelRange.pm ↑ Summary Log4perl/Filter/StringMatch.pm »
1 ##################################################
2 package Log::Log4perl::Layout::SimpleLayout;
3 ##################################################
4 # as documented in
5 # http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/SimpleLayout.html
6 ##################################################
7  
8 54 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 54 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 54 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 54 ▶use Log::Log4perl::Level;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 54 ▶no strict qw(refs);
Subroutine BEGIN: called CC=1 SCAR=0.0
14 54 ▶use base qw(Log::Log4perl::Layout);
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 ##################################################
17 90 ▶sub new {
Subroutine new: called CC=2 SCAR=7.2
Pod undocumented
18 ##################################################
19 90 my $class = shift;
20 90 ▶ $class = ref ($class) || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
0900
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
21  
22 90 my $self = {
23 format => undef,
24 info_needed => {},
25 stack => [],
26 };
27  
28 90 bless $self, $class;
29  
30 90 return $self;
31 }
32  
33 ##################################################
34 148 ▶sub render {
Subroutine render: called CC=1 SCAR=0.0
Pod undocumented
35 ##################################################
36 148 my($self, $message, $category, $priority, $caller_level) = @_;
37  
38 148 return "$priority - $message\n";
39 }
40  
41 54 1;
42  
43 __END__
« Log4perl/Filter/LevelRange.pm ↑ Summary Log4perl/Filter/StringMatch.pm »