Lines 6-18
use Plack::Middleware::Debug;
Link Here
|
6 |
use Plack::App::Directory; |
6 |
use Plack::App::Directory; |
7 |
|
7 |
|
8 |
#BZ 16357, add timestamps to warnings |
8 |
#BZ 16357, add timestamps to warnings |
9 |
use Log::Log4perl qw(:easy); |
9 |
use Koha::Logger; |
10 |
Log::Log4perl->easy_init({ level => $WARN, utf8 => 1 }); |
10 |
|
11 |
my $logger = Log::Log4perl->get_logger(); # use the default logger style |
11 |
my $logger = Koha::Logger->get({ interface => 'plack-error' }); |
12 |
$SIG{__WARN__} = sub { |
12 |
$SIG{__WARN__} = sub { $logger->warn(shift); }; |
13 |
my $message = shift; |
13 |
$SIG{__DIE__} = sub { $logger->fatal(shift); }; |
14 |
$logger->warn($message); |
|
|
15 |
}; |
16 |
|
14 |
|
17 |
use CGI qw(-utf8 ); # we will lose -utf8 under plack |
15 |
use CGI qw(-utf8 ); # we will lose -utf8 under plack |
18 |
{ |
16 |
{ |
19 |
- |
|
|