[Koha-bugs] [Bug 13413] Koha::Log - an attempt to have sane logging in Koha

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 31 06:14:58 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13413

--- Comment #6 from Srdjan Jankovic <srdjan at catalyst.net.nz> ---
* For some reason when I started this work, I did not see bug 8190 when I
searched. Horrible omission, no excuses.

* bug 8190 is a bit wider, and this replaces only one part of it (the logging
module itself). If this is chosen, bug 8190 can easily be reworked to use this
logger instead of its own implementation.

Now comparison:

* Log::LogLite seems to be limited to logging to a file only. To me it is a
serious limitation, so if we wanted to extend it to support multiple sinks,
we'd need to roll our sleeves. Nothing bad in that, but still. An example would
be logging to the standard sink (a file or syslog) and sending error emails, eg
"log me at info level, but email me errors".

* What really attracted me to Log::Contextual was the use of code blocks to
log, so complex debugging can be left in without any performance penalty (as
stated in the pod). Although some may argue it is confusing.

* There are some fancy stuff one could do (temp logger etc), but that should
not be taken in account when making decision, basic stuff is more important.

I suggest some people go over this implementation of Koha::Log, and bug 8190
implementation of Koha::Utils::Logger, and decide which one is a better fit.

There are also other interesting points for discussion, but no point bringing
those up before we decide if tis is a go or no go. In that respect this patch
is intentionally minimal, and leaves hairy issues where/how to introduce it in
the web app out. Having said that, it was implemented with intention to be able
to fit both in central point (Context), the individual scripts and library
modules at the same time - ie some best practices should be drawn, but nothing
will break if you use it in anger.

The starting point was that I needed a cron job logger, and I put some more
effort in hope it may find wider use.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list