[Koha-devel] RFC: Koha needs a logger!

Kyle Hall kyle.m.hall at gmail.com
Mon Sep 17 13:48:37 CEST 2012


>> The big question I have is: Would being able to output debug messages
>> to the web browser be useful enough to make it work implement?
>
> Currently, the Koha logs are very verbose. If we replace all occurrences of
> 'warn' to use this module and display them to the web browser, the users
> will be unhappy. I think it is preferable to manage and encapsule potential
> errors and display an adapted message for each them. Yes I know it is a big
> work :-/
> But simply it could be possible to display only error message. For
> developpers I think it is not very useful to display debug messages (just my
> opinion).
>
> Could you test and sign-off my patch if you agree with the
> Koha::Utils::Logger module and/or propose changes ?

I think the option of outputting too much to the screen is better than
not outputting enough.
I think the one really useful area for screen output of debugging
messages would be when selecting
circulation rules. This is an area where I have had many libraries
submitting bugs that were in reality
just circulation rules not set up correctly. I think it would be good
to have the GET debug flag choose
a level of output. Stuff like circulation rules would be level 1 ( info ).

I think you patch looks good, but switching it to log4perl would be
better. Many here are suggesting
they want to output to the syslog, which log4perl supports. In can
output to stderr, syslong, and a log file
simultaneously.

Kyle


More information about the Koha-devel mailing list