From 5109d5b7e43122ef48cc593d24789c9969afb722 Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Thu, 2 Feb 2023 06:53:53 -0500 Subject: [PATCH] Bug 32612: (QA follow-up) Update package files Content-Type: text/plain; charset=utf-8 Signed-off-by: David Nind Signed-off-by: Marcel de Rooy --- debian/koha-common.postinst | 32 +++++++++++++------------- debian/koha-core.postinst | 16 +++++++++++++ debian/templates/log4perl-site.conf.in | 9 +++++++- 3 files changed, 40 insertions(+), 17 deletions(-) diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst index 8d50f556fb..ae045bd565 100644 --- a/debian/koha-common.postinst +++ b/debian/koha-common.postinst @@ -237,6 +237,22 @@ EOF fi done +for site in $(koha-list); do + log4perl_config="/etc/koha/sites/$site/log4perl.conf" + if ! log4perl_component $log4perl_config "worker"; then + cat <> $log4perl_config +log4perl.logger.worker = WARN, WORKER +log4perl.appender.WORKER=Log::Log4perl::Appender::Screen +log4perl.appender.WORKER.stderr=1 +log4perl.appender.WORKER.mode=append +log4perl.appender.WORKER.layout=PatternLayout +log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n +log4perl.appender.WORKER.utf8=1 + +EOF + fi +done + for site in $(koha-list); do kohaconfig="/etc/koha/sites/$site/koha-conf.xml" logdir="$( xmlstarlet sel -t -v 'yazgfs/config/logdir' $kohaconfig )" @@ -267,20 +283,4 @@ service rabbitmq-server restart update-rc.d koha-common disable update-rc.d koha-common enable -for site in $(koha-list); do - log4perl_config="/etc/koha/sites/$site/log4perl.conf" - if ! log4perl_component $log4perl_config "worker"; then - cat <> $log4perl_config -log4perl.logger.worker = WARN, WORKER -log4perl.appender.WORKER=Log::Log4perl::Appender::Screen -log4perl.appender.WORKER.stderr=1 -log4perl.appender.WORKER.mode=append -log4perl.appender.WORKER.layout=PatternLayout -log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n -log4perl.appender.WORKER.utf8=1 - -EOF - fi -done - exit 0 diff --git a/debian/koha-core.postinst b/debian/koha-core.postinst index 8162c00870..faa63964c5 100644 --- a/debian/koha-core.postinst +++ b/debian/koha-core.postinst @@ -237,6 +237,22 @@ EOF fi done +for site in $(koha-list); do + log4perl_config="/etc/koha/sites/$site/log4perl.conf" + if ! log4perl_component $log4perl_config "worker"; then + cat <> $log4perl_config +log4perl.logger.worker = WARN, WORKER +log4perl.appender.WORKER=Log::Log4perl::Appender::Screen +log4perl.appender.WORKER.stderr=1 +log4perl.appender.WORKER.mode=append +log4perl.appender.WORKER.layout=PatternLayout +log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n +log4perl.appender.WORKER.utf8=1 + +EOF + fi +done + for site in $(koha-list); do kohaconfig="/etc/koha/sites/$site/koha-conf.xml" logdir="$( xmlstarlet sel -t -v 'yazgfs/config/logdir' $kohaconfig )" diff --git a/debian/templates/log4perl-site.conf.in b/debian/templates/log4perl-site.conf.in index 9c0339a99a..6c70012022 100644 --- a/debian/templates/log4perl-site.conf.in +++ b/debian/templates/log4perl-site.conf.in @@ -38,7 +38,6 @@ log4perl.appender.SIP.layout=PatternLayout log4perl.appender.SIP.layout.ConversionPattern=[%d] [%P] [%p] %X{accountid}@%X{peeraddr}: %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 @@ -62,3 +61,11 @@ log4perl.appender.PLACKINTRANET.mode=append log4perl.appender.PLACKINTRANET.layout=PatternLayout log4perl.appender.PLACKINTRANET.layout.ConversionPattern=[%d] [%p] %m%n log4perl.appender.PLACKINTRANET.utf8=1 + +log4perl.logger.worker = WARN, WORKER +log4perl.appender.WORKER=Log::Log4perl::Appender::Screen +log4perl.appender.WORKER.stderr=1 +log4perl.appender.WORKER.mode=append +log4perl.appender.WORKER.layout=PatternLayout +log4perl.appender.WORKER.layout.ConversionPattern=[%d] [%p] %m %l%n +log4perl.appender.WORKER.utf8=1 -- 2.30.2