Bugzilla – Attachment 105014 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 in the constructor in ExternalContent
Bug-25527-Initialize-the-logger-in-the-constructor.patch (text/plain), 3.25 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-05-18 12:32:12 UTC
(
hide
)
Description:
Bug 25527: Initialize the logger in the constructor in ExternalContent
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-05-18 12:32:12 UTC
Size:
3.25 KB
patch
obsolete
>From 228768efdead8325d66de661c0f373b8c8c9f4b0 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 18 May 2020 09:26:09 -0300 >Subject: [PATCH] Bug 25527: Initialize the logger in the constructor in > ExternalContent > >This patch makes Koha::Logger initialization happen in the ->new method >for the OverDrive handler. In the case of RecordedBooks, it doesn't look >like it is used so I just removed it. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/ExternalContent/OverDrive.pm | 13 +++++++------ > Koha/ExternalContent/RecordedBooks.pm | 3 --- > 2 files changed, 7 insertions(+), 9 deletions(-) > >diff --git a/Koha/ExternalContent/OverDrive.pm b/Koha/ExternalContent/OverDrive.pm >index 0541b552cbe..8f259716902 100644 >--- a/Koha/ExternalContent/OverDrive.pm >+++ b/Koha/ExternalContent/OverDrive.pm >@@ -25,8 +25,6 @@ use WebService::ILS::OverDrive::Patron; > use C4::Context; > use Koha::Logger; > >-use constant logger => Koha::Logger->get(); >- > =head1 NAME > > Koha::ExternalContent::OverDrive >@@ -71,6 +69,9 @@ sub new { > user_agent_params => { agent => $class->agent_string } > ) ); > } >+ >+ $self->{logger} = Koha::Logger->get(); >+ > return $self; > } > >@@ -180,13 +181,13 @@ use constant RETURN_PAGE_SESSION_KEY => "overdrive.return_page"; > sub get_return_page_from_koha_session { > my $self = shift; > my $return_page = $self->get_from_koha_session(RETURN_PAGE_SESSION_KEY) || ""; >- $self->logger->debug("get_return_page_from_koha_session: $return_page"); >+ $self->{logger}->debug("get_return_page_from_koha_session: $return_page"); > return $return_page; > } > sub set_return_page_in_koha_session { > my $self = shift; > my $return_page = shift || ""; >- $self->logger->debug("set_return_page_in_koha_session: $return_page"); >+ $self->{logger}->debug("set_return_page_in_koha_session: $return_page"); > return $self->set_in_koha_session( RETURN_PAGE_SESSION_KEY, $return_page ); > } > >@@ -196,14 +197,14 @@ sub get_token_from_koha_session { > my $self = shift; > my ($token, $token_type) > = split $ACCESS_TOKEN_DELIMITER, $self->get_from_koha_session(ACCESS_TOKEN_SESSION_KEY) || ""; >- $self->logger->debug("get_token_from_koha_session: ".($token || "(none)")); >+ $self->{logger}->debug("get_token_from_koha_session: ".($token || "(none)")); > return ($token, $token_type); > } > sub set_token_in_koha_session { > my $self = shift; > my $token = shift || ""; > my $token_type = shift || ""; >- $self->logger->debug("set_token_in_koha_session: $token $token_type"); >+ $self->{logger}->debug("set_token_in_koha_session: $token $token_type"); > return $self->set_in_koha_session( > ACCESS_TOKEN_SESSION_KEY, > join($ACCESS_TOKEN_DELIMITER, $token, $token_type) >diff --git a/Koha/ExternalContent/RecordedBooks.pm b/Koha/ExternalContent/RecordedBooks.pm >index 455087995b6..2e8c33bffdb 100644 >--- a/Koha/ExternalContent/RecordedBooks.pm >+++ b/Koha/ExternalContent/RecordedBooks.pm >@@ -24,9 +24,6 @@ use base qw(Koha::ExternalContent); > use WebService::ILS::RecordedBooks::PartnerPatron; > use WebService::ILS::RecordedBooks::Partner; > use C4::Context; >-use Koha::Logger; >- >-use constant logger => Koha::Logger->get(); > > __PACKAGE__->mk_accessors(qw(domain is_identified)); > >-- >2.26.2
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