sub log { my $self = shift; my $output = shift; unless ( exists $self->{ _log } ) { Log::Log4perl->init( $self->getRoot( "/etc/log.conf" ) ); my $log = Log::Log4perl->get_logger( $0 ); if ( defined $log ) { $self->{ _log } = $log; } } unless( $self->{ _daemonize } ) { my $log2cmdline = Slurper::Log->new(); $self->{ _log } = $log2cmdline; } return $self->{ _log }; }