[Koha-bugs] [Bug 8190] Koha does not have a logging module
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jun 5 15:55:48 CEST 2012
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8190
--- Comment #1 from Jonathan Druart <jonathan.druart at biblibre.com> ---
Created attachment 9921
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9921&action=edit
Bug 8190: C4::Logger, Logging module
How it works:
use C4::Logger qw/$log/;
$log = C4::Logger->new;
$log->debug("This is a debug message");
$log->info("This is an information");
$log->error("This is an error !");
The Logger constructor can take an hash reference with "file" and "level" to
define a filepath or a log level.
For a log level >= warning, a call stack is printed.
Prerequisite:
- set an environment variable LOG in your virtual host:
SetEnv LOG /home/koha/var/log/opac.log
- set a write flag for www-data on this file
Please have a look at t/Logger.t for more details.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list