[Koha-devel] A C4::Logger module would be useful ?
Dobrica Pavlinusic
dpavlin at rot13.org
Tue Jun 5 17:01:24 CEST 2012
On Wed, Jun 06, 2012 at 02:22:20AM +1200, Chris Cormack wrote:
> On 6 June 2012 02:17, Jared Camins-Esakov <jcamins at cpbibliography.com> wrote:
> > Jonathan,
> >
> >> I have developped a logging module (based on LogLite). I think it could be
> >> useful for Koha.
> >>
> >> A new system preference controls the log level (eg. level warning for
> >> production and debug for development).
> >>
> >> It can be used by a simple script or into Koha.
> >>
> >> How it works: See Bug 8190
> >> (http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8190)
> >>
> >> Please have a look at that, and tell me what do you think about it.
> >> Technically, is it satisfying for you?
> >
> >
> > +1 from me for the idea. I didn't look at the code, but I love the idea.
> >
> What he said !
+1 from me.
Should we also wrap warn(s) to emit debug output like this?
$SIG{__WARN__} = sub {
C4::Logger->new->debug( @_ );
}
Right now every warn in code makes patch fail QA (I know that first
hand ;-) and it seems to me it's easier to just put warn instead of
C4::Logger->new->debug( "this used to be warn" );
More information about the Koha-devel
mailing list