Bugzilla – Attachment 109133 Details for
Bug 16357
Plack error logs are not time stamped
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16357: Only use Log4perl middleware if appenders defined
Bug-16357-Only-use-Log4perl-middleware-if-appender.patch (text/plain), 1.73 KB, created by
David Cook
on 2020-08-26 01:00:00 UTC
(
hide
)
Description:
Bug 16357: Only use Log4perl middleware if appenders defined
Filename:
MIME Type:
Creator:
David Cook
Created:
2020-08-26 01:00:00 UTC
Size:
1.73 KB
patch
obsolete
>From 368fa77a0c6053aa9ca528dded81a1b18f60b7f7 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 26 Aug 2020 00:58:36 +0000 >Subject: [PATCH] Bug 16357: Only use Log4perl middleware if appenders defined > >This patch checks that the loggers used by the middleware >actually have appenders defined. > >Without this patch, if the loggers don't have appenders >defined in the log4perl file, the logs will just be lost. >--- > debian/templates/plack.psgi | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > >diff --git a/debian/templates/plack.psgi b/debian/templates/plack.psgi >index 7bfb34fb68..9fb20990dc 100644 >--- a/debian/templates/plack.psgi >+++ b/debian/templates/plack.psgi >@@ -77,18 +77,24 @@ builder { > enable "+Koha::Middleware::RealIP"; > > mount '/opac' => builder { >- enable 'Log4perl', category => 'plack-opac'; >- enable 'LogWarn'; >+ if ( Log::Log4perl->get_logger('plack-opac')->has_appenders ){ >+ enable 'Log4perl', category => 'plack-opac'; >+ enable 'LogWarn'; >+ } > $opac; > }; > mount '/intranet' => builder { >- enable 'Log4perl', category => 'plack-intranet'; >- enable 'LogWarn'; >+ if ( Log::Log4perl->get_logger('plack-intranet')->has_appenders ){ >+ enable 'Log4perl', category => 'plack-intranet'; >+ enable 'LogWarn'; >+ } > $intranet; > }; > mount '/api/v1/app.pl' => builder { >- enable 'Log4perl', category => 'plack-api'; >- enable 'LogWarn'; >+ if ( Log::Log4perl->get_logger('plack-api')->has_appenders ){ >+ enable 'Log4perl', category => 'plack-api'; >+ enable 'LogWarn'; >+ } > $apiv1; > }; > }; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16357
:
71752
|
71753
|
71871
|
72290
|
72296
|
73404
|
77529
|
77530
|
77531
|
77532
|
77533
|
106141
|
106313
|
106319
|
106320
|
109053
|
109054
|
109055
|
109056
|
109060
|
109067
|
109068
|
109133
|
109215
|
110107
|
110108
|
110109
|
110249
|
110250
|
110251
|
110252
|
110253
|
110254