Bugzilla – Attachment 40661 Details for
Bug 14167
Add Koha::Logger based on Log4perl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14167 [QA Followup] - Embed default config into Koha::Logger
Bug-14167-QA-Followup---Embed-default-config-into-.patch (text/plain), 2.06 KB, created by
Kyle M Hall (khall)
on 2015-06-26 13:59:46 UTC
(
hide
)
Description:
Bug 14167 [QA Followup] - Embed default config into Koha::Logger
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-06-26 13:59:46 UTC
Size:
2.06 KB
patch
obsolete
>From f08603aaaab663273889120329d6a3df88aeb1df Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 16 Jun 2015 13:32:53 -0400 >Subject: [PATCH] Bug 14167 [QA Followup] - Embed default config into Koha::Logger > >--- > Koha/Logger.pm | 28 +++++++++++++++++++++------- > 1 files changed, 21 insertions(+), 7 deletions(-) > >diff --git a/Koha/Logger.pm b/Koha/Logger.pm >index 6ba0af8..a3b58ab 100644 >--- a/Koha/Logger.pm >+++ b/Koha/Logger.pm >@@ -40,18 +40,32 @@ use C4::Context; > BEGIN { > Log::Log4perl->wrapper_register(__PACKAGE__); > >- my $conf; > if ( exists $ENV{"LOG4PERL_CONF"} and $ENV{'LOG4PERL_CONF'} and -s $ENV{"LOG4PERL_CONF"} ) { >- > # Check for web server level configuration first >- $conf = $ENV{"LOG4PERL_CONF"}; >+ Log::Log4perl->init_once( $ENV{"LOG4PERL_CONF"} ); > } >- else { >+ elsif ( C4::Context->config("log4perl_conf") ) { > # If no web server level config exists, look in the koha conf file for one >- $conf = C4::Context->config("log4perl_conf"); >+ Log::Log4perl->init_once( C4::Context->config("log4perl_conf") ); >+ } else { >+ my $logdir = C4::Context->config("logdir"); >+ my $conf = qq( >+ log4perl.logger.intranet = WARN, INTRANET >+ log4perl.appender.INTRANET=Log::Log4perl::Appender::File >+ log4perl.appender.INTRANET.filename=$logdir/intranet-error.log >+ log4perl.appender.INTRANET.mode=append >+ log4perl.appender.INTRANET.layout=PatternLayout >+ log4perl.appender.INTRANET.layout.ConversionPattern=[%d] [%p] %m %l %n >+ >+ log4perl.logger.opac = WARN, OPAC >+ log4perl.appender.OPAC=Log::Log4perl::Appender::File >+ log4perl.appender.OPAC.filename=$logdir/opac-error.log >+ log4perl.appender.OPAC.mode=append >+ log4perl.appender.OPAC.layout=PatternLayout >+ log4perl.appender.OPAC.layout.ConversionPattern=[%d] [%p] %m %l %n >+ ); >+ Log::Log4perl->init_once(\$conf); > } >- >- Log::Log4perl->init_once($conf); > } > > =head2 get >-- >1.7.2.5
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 14167
:
38953
|
38954
|
38980
|
38981
|
38993
|
39103
|
39180
|
39886
|
39887
|
39888
|
39889
|
39890
|
39891
|
39892
|
39893
|
39894
|
39895
|
40200
|
40652
|
40653
|
40657
|
40658
|
40659
|
40660
| 40661 |
40662
|
40663
|
40664
|
41109
|
41111
|
41145
|
41146