Bug 25245: (follow-up) Use Koha::Logger

Update script to use Koha::Logger to capture method failures.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2020-04-27 13:30:24 +01:00 committed by Jonathan Druart
parent 63b926b28b
commit 441ba0bd23

View file

@ -2,9 +2,12 @@
use Modern::Perl;
use Koha::Logger;
use Koha::Script -cron;
cronlogaction();
my $logger = Koha::Logger->get();
if ( C4::Context->config("enable_plugins") ) {
my @plugins = Koha::Plugins->new->GetPlugins(
{
@ -18,6 +21,7 @@ if ( C4::Context->config("enable_plugins") ) {
}
catch {
warn "$_";
$logger->warn("$_");
};
}
}