From d950031736602fc65cd355c7bb61718abee0f967 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 16 Apr 2021 11:03:11 +0100 Subject: [PATCH] Bug 14300: Add %P to SIP LogPattern This patch adds `%P` to the SIP log4perl configuration so that PID is recorded against log lines. This allows transactions to be more easily tied together under one SIPServer, thus making it easier to pick out a whole transaction from start to finish. --- debian/koha-common.postinst | 2 +- debian/koha-core.postinst | 2 +- debian/templates/log4perl-site.conf.in | 2 +- etc/log4perl.conf | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst index f5ee256f16..9156a952f3 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] %m %l %n +log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %m %l %n log4perl.appender.SIP.utf8=1 EOF diff --git a/debian/koha-core.postinst b/debian/koha-core.postinst index 379b9e89cc..348367e11d 100644 --- a/debian/koha-core.postinst +++ b/debian/koha-core.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] %m %l %n +log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%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 16446c2ffd..4db8f89be8 100644 --- a/debian/templates/log4perl-site.conf.in +++ b/debian/templates/log4perl-site.conf.in @@ -35,7 +35,7 @@ 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] %m %l %n +log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %m %l %n log4perl.appender.SIP.utf8=1 diff --git a/etc/log4perl.conf b/etc/log4perl.conf index 16446c2ffd..940c2d0397 100644 --- a/etc/log4perl.conf +++ b/etc/log4perl.conf @@ -35,10 +35,9 @@ 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] %m %l %n +log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %m %l %n log4perl.appender.SIP.utf8=1 - log4perl.logger.plack-opac = WARN, PLACKOPAC log4perl.appender.PLACKOPAC=Log::Log4perl::Appender::File log4perl.appender.PLACKOPAC.filename=__LOG_DIR__/plack-opac-error.log -- 2.20.1