Koha needs a better logger, and it seems like the best solution would be to take advantage of Log4perl which is already a fully featured logger. We use Log4perl to selectively decide what statements should be logged, and where they should go! Test plan: 0) Install Log::Log4perl via packages or cpan 1) Apply this patch and the example renewal patch 2) Copy etc/log4perl.conf to your koha conf directory, edit the paths to match your current error logs 3) Edit your koha-conf file and add the <log4perl_conf>/path/to/log4perl.conf</log4perl_conf> line 4) Watch your intranet and opac error logs 5) Perform a renewal via the staff interface, note there is nothing new in the log file 7) Update the log4perl.conf, change the log level from WARN to TRACE for both the staff and opac sides 8) Perform a renewal via the staff interface, note the logged lines 9) Perform a renewal via the opac, note the logged lines Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended this patch: Moved the renewal stuff to a separate example patch. And upgraded the DEBUG level to WARN in the log4perl config file. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
13 lines
617 B
Text
13 lines
617 B
Text
log4perl.logger.intranet = WARN, INTRANET
|
|
log4perl.appender.INTRANET=Log::Log4perl::Appender::File
|
|
log4perl.appender.INTRANET.filename=__LOG_DIR__/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=__LOG_DIR__/opac-error.log
|
|
log4perl.appender.OPAC.mode=append
|
|
log4perl.appender.OPAC.layout=PatternLayout
|
|
log4perl.appender.OPAC.layout.ConversionPattern=[%d] [%p] %m %l %n
|