https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18205 --- Comment #35 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #34)
That said, Log::Log4perl doesn't have the exact same api as Mojo::Log.
In the case of Mojolicious::Plugin::OpenAPI, it's not a drama, because it only uses $c->app->log->$log_level(), which is supported by Log::Log4perl.
Bug 31378 is going to use Mojolicious::Plugin::OAuth2, but it just uses $app->log->error() and $app->log->debug().
When running as a synchronous app, everything seems to work. I wonder what might happen with an asynchronous app though. Not that we're anywhere near that.
The *claimed* benefit of MojoX::Log::Log4perl is that you get support for all the Mojo::Log methods (https://metacpan.org/pod/MojoX::Log::Log4perl#DESCRIPTION:) So using Koha::Logger works but I suppose it would come with some risk if we use a plugin which uses a Mojo::Log method that Koha::Logger doesn't support. In reality, MojoX::Log::Log4perl doesn't actually support all of Mojo::Log's methods either, but it subclasses Mojo::EventEmitter which means it could be used in asynchronous code. -- MojoX::Log::Log4perl is only 143 lines of code. We could always do our own version if we cared. -- -- You are receiving this mail because: You are watching all bug changes.