Bug 22678: Replace a few unneeded Koha::Logger calls
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 29 Aug 2022 09:58:38 +0000 (09:58 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 24 Oct 2022 17:37:03 +0000 (14:37 -0300)
commitc8dd361a36e79923d3121044c6ccdf611761fa51
tree3a23302618f7dd8eb7c3ac0713ae3ddea6174add
parent490a056f59d0aae52fde84e3450f29b3bc09c87d
Bug 22678: Replace a few unneeded Koha::Logger calls

We have Koha::Logger via the Mojo app now.

Test plan:
Run perl t/db_dependent/api/v1/unhandled_exceptions.t
Your plack-api-error.log should contain something like:
    [2022/08/29 12:15:25] [ERROR] DELETE /api/v1/patrons/1052: unhandled exception (Koha::Exception)<<Exception 'Koha::Exception' thrown 'delete died'>>

Bonus:
Add one line to Koha/REST/Plugin/PluginRoutes.pm:
    $app->log->error('PluginRoutes L49');
Before the line with if ( C4::Context->config("enable_plugins") )
Restart and hit the API once again.
Your log should contain: [2022/08/29 12:21:55] [ERROR] PluginRoutes L49
This serves to demonstrate that the $api->log change in PluginRoutes works.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/REST/Plugin/Exceptions.pm
Koha/REST/Plugin/PluginRoutes.pm