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

--- Comment #16 from Marcel de Rooy <[email protected]> ---
(In reply to David Cook from comment #13)
> I'm not so sure about the logging change TBH, so I'm going to Failed QA this
> one.

I have experimented a bit with removing the log_file parameter to Net::Server.
Since we are already catching STDERR with Trapper. But note that our logging in
SIP still is a bit cumbersome (historical ballast).

We use C4::SIP::Logger. Which has been set in SIPServer:
    set_logger( Koha::Logger->get( { interface => 'sip' } ) );
And again in process_request:
    $self->{logger} = set_logger( Koha::Logger->get( { interface => 'sip' } )
);
But we also do:
    tie *STDERR, "C4::SIP::Trapper";
To redirect warns to Trapper. Which also calls Koha::Logger.
And Koha::Logger is yet another wrapper for Log::Log4perl.

So removing the log_file should be fine. We are already catching it to that
file. We do not need the OPEN method since removing the log_file makes
Net::Server no longer touch STDERR. And in the PRINT method we need to adjust
the caller_depth. I tested with caller_depth +3 / -3 to get the 'real' caller.
And I chomped the message with %m{chomp} in log4perl.conf to remove unneeded
newlines in the logfile.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to