File Coverage

blib/lib/HPC/Runner/Command/submit_jobs/Plugin/Role/Log.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package HPC::Runner::Command::submit_jobs::Plugin::Role::Log;
2              
3 1     1   799 use Moose::Role;
  1         4  
  1         11  
4 1     1   8402 use namespace::autoclean;
  1         4  
  1         14  
5 1     1   102 use Log::Log4perl qw(:easy);
  1         4  
  1         12  
6              
7             ##Application log
8             ##There is a bug in here somewhere - this be named anything ...
9             has 'log' => (
10             is => 'rw',
11             default => sub {
12             my $self = shift;
13              
14             my $log_conf = q(
15             log4perl.rootLogger = DEBUG, Screen
16             log4perl.appender.Screen = \
17             Log::Log4perl::Appender::ScreenColoredLevels
18             log4perl.appender.Screen.layout = \
19             Log::Log4perl::Layout::PatternLayout
20             log4perl.appender.Screen.layout.ConversionPattern = \
21             [%d] %m %n
22             );
23             Log::Log4perl::init( \$log_conf );
24             return Log::Log4perl->get_logger();
25             }
26             );
27              
28              
29             1;