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!
Created attachment 38953 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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 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>/path/to/log4perl.conf</log4perl> 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 DEBUG 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
Created attachment 38954 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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 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>/path/to/log4perl.conf</log4perl> 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 DEBUG 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
Comment on attachment 38954 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl Review of attachment 38954 [details] [review]: ----------------------------------------------------------------- ::: Koha/Logger.pm @@ +58,5 @@ > + my ( $class, $category ) = @_; > + > + croak("No category passed in!") unless $category; > + > + my $interface = C4::Context->interface(); What if it isn't set?
(In reply to M. Tompsett from comment #3) > Comment on attachment 38954 [details] [review] [review] > Bug 14167 - Add Koha::Logger based on Log4perl > > Review of attachment 38954 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: Koha/Logger.pm > @@ +58,5 @@ > > + my ( $class, $category ) = @_; > > + > > + croak("No category passed in!") unless $category; > > + > > + my $interface = C4::Context->interface(); > > What if it isn't set? The idea is that we want the category to be required. That is absolutely no reason to log a line without specifying a category.
Created attachment 38980 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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 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 DEBUG 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
> > ::: Koha/Logger.pm > > @@ +58,5 @@ > > > + my ( $class, $category ) = @_; > > > + > > > + croak("No category passed in!") unless $category; > > > + > > > + my $interface = C4::Context->interface(); > > > > What if it isn't set? I think I missed your meaning. That's a very good question. By default if the interface isn't 'staff' it's 'opac'. I think maybe we should be able to pass in an interface parameter as well so we can set the interface to 'cli' or 'cron' or other such things.
Created attachment 38981 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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 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 DEBUG 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
Created attachment 38993 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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 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 DEBUG 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
Created attachment 39103 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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 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 DEBUG 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>
Nice concise bit of code here adding a long needed logger to koha in as simple a way as possible using a well developed lib. Lets make the choice and get this rolling! Minor comments, I can't fully remember how the package building get put together.. but I 'think' we need a copy of the log4perl.conf file that's added here also adding under the debian dir somewhere. I'll try and dig out my notes to advise, assuming Tomas or Robin don't beat me to it. ;)
(In reply to Martin Renvoize from comment #10) > Nice concise bit of code here adding a long needed logger to koha in as > simple a way as possible using a well developed lib. > > Lets make the choice and get this rolling! > > Minor comments, I can't fully remember how the package building get put > together.. but I 'think' we need a copy of the log4perl.conf file that's > added here also adding under the debian dir somewhere. > > I'll try and dig out my notes to advise, assuming Tomas or Robin don't beat > me to it. ;) Indeed, for the packages we will need to: - Add a template file into debian/templates/(logger4perl-site.conf.in ?) - Tweak the debian/scripts/koha-create script so it correctly puts the template file with the right variable substitutions. - Maybe add some switches controlling the logging configuration, but this could go into a separate bug.
How does this compare to bug 13413? As for the packaging stuff, what Tomás says looks like the right idea to me, it shouldn't be too complicated.
(In reply to Robin Sheat from comment #12) > How does this compare to bug 13413? > > As for the packaging stuff, what Tomás says looks like the right idea to me, > it shouldn't be too complicated. The biggest advantages of this patch vs bug 13413 are a) Simplicity of implementation b) Incredibly powerful configurability by just editing a configuration file
Created attachment 39180 [details] [review] Bug 14167 [QA Followup] - Add template and changes needed for packages
QA: Looking at this one now..
Created attachment 39886 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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 DEBUG 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.
Created attachment 39887 [details] [review] Bug 14167 - [DO_NOT_PUSH] Renewal example patch for logging This patch adds logging to the renewal process to test the first patch. Note to RM: Do not push this patch. Test plan: See the first patch. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 39888 [details] [review] Bug 14167 [QA Followup] - Add template and changes needed for packages Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: upgraded DEBUG level to WARN in config file.
Created attachment 39889 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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.
Created attachment 39890 [details] [review] Bug 14167 - [DO_NOT_PUSH] Renewal example patch for logging This patch adds logging to the renewal process to test the first patch. Note to RM: Do not push this patch. Test plan: See the first patch. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 39891 [details] [review] Bug 14167 [QA Followup] - Add template and changes needed for packages
Please wait..not ready yet!
Created attachment 39892 [details] [review] Bug 14167 [QA Followup] - Add template and changes needed for packages Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: upgraded DEBUG level to WARN in config file.
Created attachment 39893 [details] [review] Bug 14167: [QA Follow-up] Adjust category handling in Koha::Logger The first patch makes the category parameter mandatory. This patch makes it optional, falling back to the current package. This is the expected log4perl model. It would not be necessary to pass the class name everywhere (check subclasses..) It also adds a delimiter between the interface and the class name. This allows you to add config lines like: log4perl.logger.opac.C4.Auth = DEBUG, OPAC log4perl.logger.intranet.C4.Circulation = TRACE, INTRANET The first line would make the logger more sensitive to C4::Auth log messages while staying at the WARN level for other messages, etc. The second line makes the trace visible from the renewal example. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 39894 [details] [review] Bug 14167 - [DO_NOT_PUSH] Renewal example patch for logging This patch adds logging to the renewal process to test the first patch. Note to RM: Do not push this patch. Test plan: See the first patch. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended the get call in light of the QA follow-up for category.
Created attachment 39895 [details] [review] Bug 14167 [QA Followup] - Add template and changes needed for packages Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: upgraded DEBUG level to WARN in config file.
QA Comment: Nice feature. Economic implementation of logging. Although the code looks good to me, I still have some concerns: [1] For logging level and category handling, I made some tiny adjustments via amending or follow-up. [2] A bigger problem could be permissions on the logfile. If you do not have sufficient permissions, Log4perl will make a crash. So this is a very fundamental issue. In Debian the koha instance user should have permissions on the file, but I noticed that after a forced logrotate, the file permissions for the new log file were changed to root and Koha crashed on that. What about other distros btw? [3] The BEGIN section of Koha::Logger assumes that it will have either a conf file via $ENV{LOG4PERL_CONF} or the koha-conf.xml. If you do not have either one, Koha will again crash on you (Configuration not defined). It is safer imo to go always via the koha-conf. If there is nothing in koha-conf, set some flag, warn once and do nothing or perhaps fall back to warn. (Note that you should trap all calls to warn, trace etc. in that case.) Note that a new installation would be fine. But an upgrade does not guarantee the presence of a config file. Also note that you can pass some default configuration string to init() too. By conclusion, we could argue that a Koha administrator should just take care of the perl module and the log4perl config file and push this as-is. But we also know that this will result in problems at various locations when upgrading. What would be the best way to go here? I will be happy to follow through on this report, but not in the next two weeks. (But another QAer is welcome too.) Changing status to reflect need for changes or clarification..
(In reply to Marcel de Rooy from comment #27) > QA Comment: > Nice feature. Economic implementation of logging. > Although the code looks good to me, I still have some concerns: > > [1] For logging level and category handling, I made some tiny adjustments > via amending or follow-up. Excellent! > > [2] A bigger problem could be permissions on the logfile. > If you do not have sufficient permissions, Log4perl will make a crash. So > this is a very fundamental issue. In Debian the koha instance user should > have permissions on the file, but I noticed that after a forced logrotate, > the file permissions for the new log file were changed to root and Koha > crashed on that. > What about other distros btw? Is logrotate creating the files? I don't see a create command in /etc/logrotate.d/koha-common. It's possible that this could be fixed with an addition like: create 660 root koha where the owner can be root as long as we were to create a koha group that each koha-* user belonged to. However, I don't have any idea how to write the upgrade patch for that. http://www.thecave.info/logrotate-set-file-permissions/ > [3] The BEGIN section of Koha::Logger assumes that it will have either a > conf file via $ENV{LOG4PERL_CONF} or the koha-conf.xml. > If you do not have either one, Koha will again crash on you (Configuration > not defined). > It is safer imo to go always via the koha-conf. If there is nothing in > koha-conf, set some flag, warn once and do nothing or perhaps fall back to > warn. (Note that you should trap all calls to warn, trace etc. in that > case.) > Note that a new installation would be fine. But an upgrade does not > guarantee the presence of a config file. > Also note that you can pass some default configuration string to init() too. That could be fixed with a followup. Basically we should check for the existance of the log4perl config file, and if it doesn't exist pass it a default config that can be hard coded into the module ( and would be the same as the config we have here ). > By conclusion, we could argue that a Koha administrator should just take > care of the perl module and the log4perl config file and push this as-is. > But we also know that this will result in problems at various locations when > upgrading. What would be the best way to go here? I would say we should do what is in our power and is reasonable to make the upgrade path as smooth as possible. It may be that we can't automate everything, and we'll have to provide upgrade instructions, but none of this seems too onerous. > I will be happy to follow through on this report, but not in the next two > weeks. (But another QAer is welcome too.) > > Changing status to reflect need for changes or clarification..
Created attachment 40200 [details] [review] Bug 14167 [QA Followup] - Embed default config into Koha::LoggerBug
I'm happy with Marcels and Kyles follow-ups, just the file permissions issue Marcel brought to our attention that needs addressing now, and then I think we should be good to go with this one.
Moving to "Failed QA" to indicate there is something missing here still - please address! :)
(In reply to Katrin Fischer from comment #31) > Moving to "Failed QA" to indicate there is something missing here still - > please address! :) Now working on this one again. Hope to get this further!
Created attachment 40652 [details] [review] Bug 14167: [QA Follow-up] Making Koha::Logger bit more crash resistant Moving the BEGIN block to _init for the most part. We only need to initialize when we actually start using the logger. Removed the third init part. If we do not have a log4perl_conf in the koha config, we are not using it yet. Method get uses hash parameters now. It calls init. If we do not have a config or the logfile is not writable, we will not use log4perl. Using AUTOLOAD as a wrapper around Log4perl in order to add some checks that log4perl does not have. If a logrotate would change file permissions on a default logfile, we should catch that now too (see recheck). Test plan: Run the previous tests again. Will still add a unit test.
Created attachment 40653 [details] [review] Bug 14167: Add a unit test for Koha::Logger Test plan: Run the test.
Added two patches. See the commit messages. How do we proceed from here? Since the last two follow-ups add/change some more lines, I will first ask for a repeated signoff from Martin or Kyle. (But I still consider them as QA follow-ups.) If they agree (read: signoff), I will pass QA.
Created attachment 40657 [details] [review] Bug 14167 - Add Koha::Logger based on Log4perl 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.
Created attachment 40658 [details] [review] Bug 14167: [QA Follow-up] Adjust category handling in Koha::Logger The first patch makes the category parameter mandatory. This patch makes it optional, falling back to the current package. This is the expected log4perl model. It would not be necessary to pass the class name everywhere (check subclasses..) It also adds a delimiter between the interface and the class name. This allows you to add config lines like: log4perl.logger.opac.C4.Auth = DEBUG, OPAC log4perl.logger.intranet.C4.Circulation = TRACE, INTRANET The first line would make the logger more sensitive to C4::Auth log messages while staying at the WARN level for other messages, etc. The second line makes the trace visible from the renewal example. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 40659 [details] [review] Bug 14167 - [DO_NOT_PUSH] Renewal example patch for logging This patch adds logging to the renewal process to test the first patch. Note to RM: Do not push this patch. Test plan: See the first patch. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended the get call in light of the QA follow-up for category.
Created attachment 40660 [details] [review] Bug 14167 [QA Followup] - Add template and changes needed for packages Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: upgraded DEBUG level to WARN in config file.
Created attachment 40661 [details] [review] Bug 14167 [QA Followup] - Embed default config into Koha::Logger
Created attachment 40662 [details] [review] [SIGNED-OFF] Bug 14167: [QA Follow-up] Making Koha::Logger bit more crash resistant Moving the BEGIN block to _init for the most part. We only need to initialize when we actually start using the logger. Removed the third init part. If we do not have a log4perl_conf in the koha config, we are not using it yet. Method get uses hash parameters now. It calls init. If we do not have a config or the logfile is not writable, we will not use log4perl. Using AUTOLOAD as a wrapper around Log4perl in order to add some checks that log4perl does not have. If a logrotate would change file permissions on a default logfile, we should catch that now too (see recheck). Test plan: Run the previous tests again. Will still add a unit test. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 40663 [details] [review] [SIGNED-OFF] Bug 14167: Add a unit test for Koha::Logger Test plan: Run the test. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 40664 [details] [review] Bug 14167 [QA Followup] - Tidy Koha/Logger.pm
Thanks for your quick signoff, Kyle. QA Comment: All issues mentioned before have been addressed in various follow-ups. An upgrade without a log4perl config file will no longer be a problem. Passed QA
Robin, What do you think of adding a line like create 660 [koha-instance-user] [koha-instance-group] to koha-common.logrotate ?
(In reply to Marcel de Rooy from comment #45) > Robin, > > What do you think of adding a line like > create 660 [koha-instance-user] [koha-instance-group] > to koha-common.logrotate ? Having it as the koha-instance-group is a bit redundant, it perhaps should be adm like most syslog things (I know it's effectively like that at the moment, that's probably wrong.)
(In reply to Marcel de Rooy from comment #44) > All issues mentioned before have been addressed in various follow-ups. An > upgrade without a log4perl config file will no longer be a problem. It is possible, and perhaps the best solution, to drop files in /etc/koha/sites/* rather than assume a default. This'd be done in debian/koha-common.postinst. This is really just a heads up in case anyone wants to do it, I don't really insist on it :)
Created attachment 41109 [details] [review] Bug 14167: (QA followup) use warn instead of just STDERR This patch makes Koha::Logger use 'warn' instead of just printing to STDERR. It introduces tests for this warnings too. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Created attachment 41111 [details] [review] Bug 14167: (QA followup) new entries in koha-conf.xml should be tested in about.pl Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Enhancement pushed to master. Thanks Kyle and everyone involved.
*** Bug 13413 has been marked as a duplicate of this bug. ***
*** Bug 8190 has been marked as a duplicate of this bug. ***
A bit about log4perl here: http://blogs.perl.org/users/dean/2015/07/getting-modern-with-logging-via-log4perl.html
Created attachment 41145 [details] [review] Bug 14167: package dependencies for Log::Log4perl
Just adding the dependencies patch here to save creating a whole new bug for it.
...and this bug breaks a package build: make[1]: Leaving directory `/tmp/buildd/koha-3.21~git+20150724112213.255c84e7' dh_install -O--fail-missing dh_install: etc/koha/log4perl.conf exists in debian/tmp but is not installed to anywhere dh_install: missing files, aborting make: *** [binary] Error 2 dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 shouldn't be a big deal though.
Created attachment 41146 [details] [review] Bug 14167: remove the log4perl.conf file from /etc for packages We don't need that file in the package build because it's generated on a per-site basis from a template.
Followups pushed to master. Thanks Robin!
Good job with the Log4perl!
I found a few things to improve to be able to use Log4perl with cronjobs/commandline scripts. They all come with good regression and performance test coverage since Koha::Logger is a critical subsystem component. If you made it this far, the correct order of applying the dependant patches is as follows: Bug 16313 - Koha::Logger doesn't forward the Log::Log4perl::Logger return v~ Bug 16312 - Koha::Logger overload configuration for command line scripts ~ Bug 16306 - C4::Context->setCommandlineEnvironment() convenience function Bug 16304 - Koha::Logger, lazy load loggers so environment has time to get set Bug 16303 - Koha::Logger appenders for interface 'commandline' Bug 16302 - Koha::Logger performance tests Bug 14167 - Add Koha::Logger based on Log4perl.