]> git.koha-community.org Git - koha.git/commit
Bug 31469: log4perl.conf: Add %n to conversionpattern for Plack
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 29 Sep 2022 07:51:33 +0000 (07:51 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 5 Dec 2022 18:55:16 +0000 (18:55 +0000)
commit73d3abd65db07ab74d0e61641f84682e425c33e1
treea2f0db7526e423aa7769db197fab6fcbfd6615a6
parent0c7b340508ea2ccecf24f4883b491cb877e57c4d
Bug 31469: log4perl.conf: Add %n to conversionpattern for Plack

The PLACKOPAC, PLACKAPI and PLACKINTRANET appenders still need %n
(i.e. a newline). Note that this patch does not add %l since it
is a bit confusing because it adds a lot of Plack internal noise like:
    [2022/09/29 08:51:34] [WARN] Test mainpage CGI::Compile::ROOT::usr_share_koha_mainpage_2epl::__ANON__ /usr/share/koha/mainpage.pl (49)

The patch is a result of:
    git grep -l "log4perl.appender.PLACK" | xargs sed -i -e"/ConversionPattern/ s/%m$/%m%n/"

Test plan:
First run: sed -i -e"/ConversionPattern/ s/%m$/%m%n/" /etc/koha/sites/[YOUR_CLONE]/log4perl.conf
Edit that file, change PLACKOPAC to debug level like:
    log4perl.logger.plack-opac = DEBUG, PLACKOPAC
Restart.
Hit an OPAC page twice.
Check plack-opac logfile and verify that it contains a newline between last two messages like:
    [2022/09/29 08:04:30] [DEBUG] kohaversion : 22.0600054
    [2022/09/29 08:04:42] [DEBUG] kohaversion : 22.0600054

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ef81785d76115d1591075ed1d04a1dfe4430c5eb)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
debian/koha-common.postinst
debian/koha-core.postinst
debian/templates/log4perl-site.conf.in
etc/log4perl.conf