Bugzilla – Attachment 105020 Details for
Bug 25527
Package does not build because of missing log4perl.conf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25527: Initialize the logger when required
Bug-25527-Initialize-the-logger-when-required.patch (text/plain), 1.47 KB, created by
Jonathan Druart
on 2020-05-18 14:17:28 UTC
(
hide
)
Description:
Bug 25527: Initialize the logger when required
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-05-18 14:17:28 UTC
Size:
1.47 KB
patch
obsolete
>From 3b119eac16d3ec9bc791e17d7770f80cf2156725 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 18 May 2020 09:23:42 -0300 >Subject: [PATCH] Bug 25527: Initialize the logger when required > >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> >--- > C4/ImportBatch.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 739f9f6786..2055a168f9 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -83,8 +83,6 @@ BEGIN { > ); > } > >-our $logger = Koha::Logger->get( { category => 'C4.ImportBatch' } ); >- > =head1 NAME > > C4::ImportBatch - manage batches of imported MARC records >@@ -800,6 +798,8 @@ sub BatchCommitItems { > sub BatchRevertRecords { > my $batch_id = shift; > >+ my $logger = Koha::Logger->get( { category => 'C4.ImportBatch' } ); >+ > $logger->trace("C4::ImportBatch::BatchRevertRecords( $batch_id )"); > > my $record_type; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25527
:
105013
|
105014
|
105017
|
105018
|
105019
| 105020 |
105021