[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
Wed Aug 26 10:33:47 CEST 2020


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

--- Comment #105 from Joonas Kylmälä <joonas.kylmala at helsinki.fi> ---
(In reply to Jonathan Druart from comment #104)
> (In reply to Joonas Kylmälä from comment #102)
> > David, in the patch I have this tiny nitpick: it misses the Log::Log4perl
> > module import line, which might cause issues later if Koha::Logger in the
> > future doesn't do it. Can you resubmit the patch?
> 
> Do you think we need it? I remove Koha::Logger (import + init statements)
> and there is no complain.
> We don't import ReverseProxy either, I guess Plack modules are dealing with
> that.

We don't use ReverseProxy directly here, so yeah if plack is using that it
should import it which it probably does since this wouldn't work otherwise.
Here we use Log::Log4perl directly with the call to Log::Log4perl->get_logger
so the module needs to be imported some way or another. With the plack.psgi
there seems to be also the following code (and maybe more) that indirectly
imports Log::Log4perl for us:

> my $apiv1  = builder {
>     my $server = Mojo::Server::PSGI->new;
>     $server->load_app("$home/api/v1/app.pl");
>     $server->to_psgi_app;
> };

but I don't think we should depend on that using Log4perl in the future either.
I have not found any literature what's the best practice here, but my common
sense says that things are just too easy to break if a module author has to
worry about some module using indirectly its imports.

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


More information about the Koha-bugs mailing list