[Koha-bugs] [Bug 16357] Plack error logs are not time stamped

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Aug 25 13:57:58 CEST 2020


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

Joonas Kylmälä <joonas.kylmala at helsinki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |In Discussion

--- Comment #81 from Joonas Kylmälä <joonas.kylmala at helsinki.fi> ---
(In reply to Jonathan Druart from comment #75)
> > And, basically, I don't understand how this work. Can you explain a bit
> > more? I am confused by the Koha::Logger->get_logger call from .psgi
> 
> Should not we actually replace Koha::Logger->get_logger by
> Koha::Logger->_init?

Reading Koha/Logger.pm and https://metacpan.org/pod/Plack::Middleware::Log4perl
I got some background to this. So basically it looks like if Koha::Logger->get
is not used in Koha code (so all unexpected errors/warnings basically) then the
context variable that is set in the plack.psgi is used as a fallback. I think
you are right that we should use Koha::Logger->_init. As per the documentation
I linked for the Log4Perl middleware only Log::Log4perl::init() which
Koha::Logger->_init does AND setting category variable is needed for it to
function. Running Koha::Logger->get just sets some extra variables which we are
not even accessing.

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


More information about the Koha-bugs mailing list