Lines 38-43
use Koha::Database;
Link Here
|
38 |
use Koha::DateUtils; |
38 |
use Koha::DateUtils; |
39 |
use Koha::Logger; |
39 |
use Koha::Logger; |
40 |
|
40 |
|
|
|
41 |
use Log::Log4perl; |
41 |
use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise |
42 |
use CGI qw(-utf8 ); # we will loose -utf8 under plack, otherwise |
42 |
{ |
43 |
{ |
43 |
no warnings 'redefine'; |
44 |
no warnings 'redefine'; |
Lines 77-94
builder {
Link Here
|
77 |
enable "+Koha::Middleware::RealIP"; |
78 |
enable "+Koha::Middleware::RealIP"; |
78 |
|
79 |
|
79 |
mount '/opac' => builder { |
80 |
mount '/opac' => builder { |
80 |
enable 'Log4perl', category => 'plack-opac'; |
81 |
if ( Log::Log4perl->get_logger('plack-opac')->has_appenders ){ |
81 |
enable 'LogWarn'; |
82 |
enable 'Log4perl', category => 'plack-opac'; |
|
|
83 |
enable 'LogWarn'; |
84 |
} |
82 |
$opac; |
85 |
$opac; |
83 |
}; |
86 |
}; |
84 |
mount '/intranet' => builder { |
87 |
mount '/intranet' => builder { |
85 |
enable 'Log4perl', category => 'plack-intranet'; |
88 |
if ( Log::Log4perl->get_logger('plack-intranet')->has_appenders ){ |
86 |
enable 'LogWarn'; |
89 |
enable 'Log4perl', category => 'plack-intranet'; |
|
|
90 |
enable 'LogWarn'; |
91 |
} |
87 |
$intranet; |
92 |
$intranet; |
88 |
}; |
93 |
}; |
89 |
mount '/api/v1/app.pl' => builder { |
94 |
mount '/api/v1/app.pl' => builder { |
90 |
enable 'Log4perl', category => 'plack-api'; |
95 |
if ( Log::Log4perl->get_logger('plack-api')->has_appenders ){ |
91 |
enable 'LogWarn'; |
96 |
enable 'Log4perl', category => 'plack-api'; |
|
|
97 |
enable 'LogWarn'; |
98 |
} |
92 |
$apiv1; |
99 |
$apiv1; |
93 |
}; |
100 |
}; |
94 |
}; |
101 |
}; |
95 |
- |
|
|