Bugzilla – Attachment 104674 Details for
Bug 15253
Add Koha::Logger based logging for SIP2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15253: Remove specific logging output
Bug-15253-Remove-specific-logging-output.patch (text/plain), 3.68 KB, created by
Jonathan Druart
on 2020-05-11 10:13:07 UTC
(
hide
)
Description:
Bug 15253: Remove specific logging output
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-05-11 10:13:07 UTC
Size:
3.68 KB
patch
obsolete
>From 70ea7d2e232ab7273d8b72b03db00d8705a07e22 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 11 May 2020 12:10:24 +0200 >Subject: [PATCH] Bug 15253: Remove specific logging output > >* We should not call Log::Log4perl directly >* Not sure it is correct as I get from (comment 77): > % koha-sip --restart > > [2020/04/23 11:23:27] [ERROR] [undef]@[undef]: Argument "0.33_01" isn't > numeric in numeric lt (<) at /usr/share/perl5/Net/Server/Log/Sys/Syslog.pm > line 42. > C4::SIP::Trapper::PRINT /kohadevbox/koha/C4/SIP/Trapper.pm (24) > > Why "ERROR" when it's a warning? > The [undef]@[undef] seems wrong here. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/SIP/SIPServer.pm | 8 -------- > debian/koha-common.postinst | 2 +- > debian/templates/log4perl-site.conf.in | 2 +- > etc/log4perl.conf | 2 +- > 4 files changed, 3 insertions(+), 11 deletions(-) > >diff --git a/C4/SIP/SIPServer.pm b/C4/SIP/SIPServer.pm >index b14aaa9862..7af355465d 100755 >--- a/C4/SIP/SIPServer.pm >+++ b/C4/SIP/SIPServer.pm >@@ -105,10 +105,6 @@ sub process_request { > $self->{account} = undef; # Clear out the account from the last request, it may be different > $self->{logger} = set_logger( Koha::Logger->get( { interface => 'sip' } ) ); > >- # Flush previous MDCs to prevent accidentally leaking incorrect MDC-entries >- Log::Log4perl::MDC->put( "accountid", undef ); >- Log::Log4perl::MDC->put( "peeraddr", undef ); >- > my $sockname = getsockname(STDIN); > > # Check if socket connection is IPv6 before resolving address >@@ -183,10 +179,6 @@ sub raw_transport { > ) > ); > >- # Set MDCs after properly authenticating >- Log::Log4perl::MDC->put( "accountid", $self->{account}->{id} ); >- Log::Log4perl::MDC->put( "peeraddr", $self->{server}->{peeraddr} ); >- > siplog("LOG_DEBUG", "raw_transport: uname/inst: '%s/%s'", > $self->{account}->{id}, > $self->{account}->{institution}); >diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst >index 173f700aba..46bc087d2b 100644 >--- a/debian/koha-common.postinst >+++ b/debian/koha-common.postinst >@@ -182,7 +182,7 @@ log4perl.appender.SIP=Log::Log4perl::Appender::File > log4perl.appender.SIP.filename=/var/log/koha/$site/sip.log > log4perl.appender.SIP.mode=append > log4perl.appender.SIP.layout=PatternLayout >-log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n >+log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n > log4perl.appender.SIP.utf8=1 > > EOF >diff --git a/debian/templates/log4perl-site.conf.in b/debian/templates/log4perl-site.conf.in >index e43797314c..df61c9a9ec 100644 >--- a/debian/templates/log4perl-site.conf.in >+++ b/debian/templates/log4perl-site.conf.in >@@ -35,5 +35,5 @@ log4perl.appender.SIP=Log::Log4perl::Appender::File > log4perl.appender.SIP.filename=__LOG_DIR__/sip.log > log4perl.appender.SIP.mode=append > log4perl.appender.SIP.layout=PatternLayout >-log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n >+log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n > log4perl.appender.SIP.utf8=1 >diff --git a/etc/log4perl.conf b/etc/log4perl.conf >index e43797314c..df61c9a9ec 100644 >--- a/etc/log4perl.conf >+++ b/etc/log4perl.conf >@@ -35,5 +35,5 @@ log4perl.appender.SIP=Log::Log4perl::Appender::File > log4perl.appender.SIP.filename=__LOG_DIR__/sip.log > log4perl.appender.SIP.mode=append > log4perl.appender.SIP.layout=PatternLayout >-log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n >+log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n > log4perl.appender.SIP.utf8=1 >-- >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 15253
:
45824
|
45825
|
45826
|
58570
|
58571
|
58572
|
58573
|
58582
|
60872
|
65219
|
65220
|
65221
|
65222
|
65223
|
65224
|
65225
|
65226
|
65227
|
65228
|
71702
|
71703
|
74947
|
86573
|
86574
|
87993
|
88383
|
100062
|
100063
|
100379
|
102216
|
102217
|
102218
|
102219
|
103456
|
103457
|
103458
|
103459
|
103462
|
103499
|
103500
|
103501
|
103502
|
103503
|
103599
|
103915
|
103916
|
103917
|
103918
|
103919
|
103920
|
103921
|
104016
|
104667
|
104668
|
104669
|
104670
|
104671
|
104672
|
104673
| 104674 |
111169