Lines 41-50
use Koha::DateUtils;
Link Here
|
41 |
use Log::Log4perl qw(:easy); |
41 |
use Log::Log4perl qw(:easy); |
42 |
Log::Log4perl->easy_init({ level => $WARN, utf8 => 1 }); |
42 |
Log::Log4perl->easy_init({ level => $WARN, utf8 => 1 }); |
43 |
my $logger = Log::Log4perl->get_logger(); # use the default logger style |
43 |
my $logger = Log::Log4perl->get_logger(); # use the default logger style |
44 |
$SIG{__WARN__} = sub { |
44 |
$SIG{__WARN__} = sub { $logger->warn(shift) }; |
45 |
my $message = shift; |
45 |
$SIG{__DIE__} = sub { $logger->fatal(shift) }; |
46 |
$logger->warn($message); |
|
|
47 |
}; |
48 |
|
46 |
|
49 |
use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise |
47 |
use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise |
50 |
{ |
48 |
{ |