Bug 14167: (QA followup) Adjust category handling in Koha::Logger
commit02821d52e3406cadc96fda362abfb11e91cd6784
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 5 Jun 2015 08:08:22 +0000 (5 10:08 +0200)
committerTomas Cohen Arazi <tomascohen@unc.edu.ar>
Tue, 21 Jul 2015 13:17:49 +0000 (21 10:17 -0300)
tree52dc21d030daf7740d63fff4c3af23d2ebc1a016
parenta269e8ec4480732ade4f0cbcda0e1560c4c257d3
Bug 14167: (QA followup) 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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Koha/Logger.pm