[Koha-bugs] [Bug 15253] Add Koha::Logger based logging for SIP2

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 7 15:01:54 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15253

--- Comment #90 from Kyle M Hall <kyle at bywatersolutions.com> ---
(In reply to Jonathan Druart from comment #89)
> (In reply to Kyle M Hall from comment #87)
> > (In reply to Jonathan Druart from comment #77)
> > > % koha-sip --restart
> > > 
> > > and I get:
> > > 
> > > [2020/04/23 11:23:27] [ERROR] [undef]@[undef]: Argument "0.33_01" isn't
> > > numeric in numeric lt (<) at /usr/share/perl5/Net/Server/Log/Sys/Syslog.pm
> > > line 42.
> > >  C4::SIP::Trapper::PRINT /kohadevbox/koha/C4/SIP/Trapper.pm (24)
> > > 
> > > 
> > > Why "ERROR" when it's a warning?
> > > The [undef]@[undef] seems wrong here.
> > 
> > During normal SIP use, that will show the sip account used and the incoming
> > ip address. For unit tests and such they appear as undefs.
> 
> I was missing that they were variables defined in SIPServer.pm:
> 
> +    # Flush previous MDCs to prevent accidentally leaking incorrect
> MDC-entries
> +    Log::Log4perl::MDC->put( "accountid", undef );
> +    Log::Log4perl::MDC->put( "peeraddr",  undef );
> 
> Is that correct to use directly Log::Log4perl here? Should not it be a
> Koha::Logger method instead?

I see little benefit in using Koha::Logger directly here, it would just add
another layer of abstraction. However, I wouldn't be opposed either. It makes
more sense to prevent scope creep here and make that encapsulation part of a
future bug report.

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


More information about the Koha-bugs mailing list