| 1 | package HPC::Runner::Command::submit_jobs::Plugin::Role::Log; | ||
| 2 | |||
| 3 | 1 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use Log::Log4perl qw(:easy); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 0 | ▶ | my $self = shift; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 13 | |||
| 14 | 0 | 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 | 0 | Log::Log4perl::init( \$log_conf ); | |
| 24 | 0 | return Log::Log4perl->get_logger(); | |
| 25 | } | ||
| 26 | 1 | ); | |
| 27 | |||
| 28 | |||
| 29 | 1 | 1; | |