Bugzilla – Attachment 103088 Details for
Bug 25172
Koha::Logger init is failing silently
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25172: Make Koha::Logger explode if init went wrong
Bug-25172-Make-KohaLogger-explode-if-init-went-wro.patch (text/plain), 1.48 KB, created by
Jonathan Druart
on 2020-04-16 14:53:40 UTC
(
hide
)
Description:
Bug 25172: Make Koha::Logger explode if init went wrong
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-16 14:53:40 UTC
Size:
1.48 KB
patch
obsolete
>From 1e3d5d2eb89673c252fe7f192de88f00d36858ab Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 16 Apr 2020 16:50:58 +0200 >Subject: [PATCH] Bug 25172: Make Koha::Logger explode if init went wrong > >We do not want to fail silently for the logger. >--- > Koha/Logger.pm | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/Koha/Logger.pm b/Koha/Logger.pm >index 1680dff6de..fb545af544 100644 >--- a/Koha/Logger.pm >+++ b/Koha/Logger.pm >@@ -118,18 +118,19 @@ sub DESTROY { } > > sub _init { > >- my $log4perl_config_filepath = >+ #my $env_LOG4PERL_CONF = exists $ENV{LOG4PERL_CONF} ? $ENV{LOG4PERL_CONF} : undef; >+ my $log4perl_config = > exists $ENV{"LOG4PERL_CONF"} >- and $ENV{'LOG4PERL_CONF'} >- and -s $ENV{"LOG4PERL_CONF"} >+ && $ENV{'LOG4PERL_CONF'} >+ && -s $ENV{"LOG4PERL_CONF"} > # Check for web server level configuration first > # In this case we ASSUME that you correctly arranged logfile > # permissions. If not, log4perl will crash on you. >- ? Log::Log4perl->init_once( $ENV{"LOG4PERL_CONF"} ); >+ ? $ENV{"LOG4PERL_CONF"} > : C4::Context->config("log4perl_conf"); > > # This will explode with the relevant error message if something is wrong in the config file >- return Log::Log4perl->init_once($conf); >+ return Log::Log4perl->init_once($log4perl_config); > } > > sub _recheck_logfile { # recheck saved logfile when logging message >-- >2.20.1
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 25172
:
103088
|
103089
|
103090
|
103091
|
103300
|
103301
|
103302
|
103303
|
103304
|
103305
|
103306
|
103307
|
103310
|
103391
|
103392
|
103393
|
103394
|
103395
|
103485