use Koha::Logger; my $logger = Koha::Logger->get; $logger->warn( 'WARNING: Serious error encountered' ); $logger->debug( 'I thought that this code was not used' );
Returns a logger object (based on log4perl). Category and interface hash parameter are optional. Normally, the category should follow the current package and the interface should be set correctly via C4::Context.
In order to prevent a crash when log4perl cannot write to Koha logfile, we check first before calling log4perl. If log4perl would add such a check, this would no longer be needed.
Dummy destroy to prevent call to AUTOLOAD
Adds a new appender for the given logger that will log all DEBUG-and-higher messages to stderr. Useful for daemons.
Kyle M Hall, <email@example.com> Marcel de Rooy, Rijksmuseum