In an OO package, the logger initialization should happen in the
constructor. This is not an OO package and the initialization is
happening on loading it. This is a wrong behaviour and certainly breaks
in environments where initialization cannot happen (package building,
for example). There could be several options to solve this, as it is
used in a single sub on this package, I opted for initializing on that
sub.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
);
}
-our $logger = Koha::Logger->get( { category => 'C4.ImportBatch' } );
-
=head1 NAME
C4::ImportBatch - manage batches of imported MARC records
sub BatchRevertRecords {
my $batch_id = shift;
+ my $logger = Koha::Logger->get( { category => 'C4.ImportBatch' } );
+
$logger->trace("C4::ImportBatch::BatchRevertRecords( $batch_id )");
my $record_type;