into a separate module, that doesn't have a separate package. Then include only that module in your scripts, this should reduce the extra code to a single use..blah.. statement.use Log::Log4perl qw(:levels); Log::Log4perl::init('/home/code/log4perl-conf.txt'); my $logger = Log::Log4perl->get_logger($0); $SIG{__DIE__} = sub {$Log::Log4perl::caller_depth++; $logger->fatal('f +atal: ', @_); die @_;};
In reply to Re: Log::Log4Perl best practices
by bl0rf
in thread Log::Log4Perl best practices
by water
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |