From c0d76f707b85821144c7e64b78d5a0c42c14dafd Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 24 May 2024 07:55:27 +0000 Subject: [PATCH] Bug 36948: (follow-up) Remove log_file param, adjust caller_depth We keep OPEN when people still use log_file or setsid. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize --- C4/SIP/Trapper.pm | 11 +++++++++-- debian/templates/SIPconfig.xml | 3 --- etc/SIPconfig.xml | 3 --- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/C4/SIP/Trapper.pm b/C4/SIP/Trapper.pm index ef99b5de17..658c779188 100644 --- a/C4/SIP/Trapper.pm +++ b/C4/SIP/Trapper.pm @@ -27,14 +27,21 @@ sub TIEHANDLE { sub PRINT { my $self = shift; - $Log::Log4perl::caller_depth++; + $Log::Log4perl::caller_depth += 3; my $logger = Koha::Logger->get( { interface => 'sip', category => 'STDERR' } ); warn @_; $logger->warn(@_); - $Log::Log4perl::caller_depth--; + $Log::Log4perl::caller_depth -= 3; } +=head2 OPEN + + We need OPEN in case Net::Server tries to redirect STDERR. This will + be tried when param log_file or setsid is passed. + +=cut + sub OPEN { return 1; } diff --git a/debian/templates/SIPconfig.xml b/debian/templates/SIPconfig.xml index dc1ca38a4d..53b0638802 100644 --- a/debian/templates/SIPconfig.xml +++ b/debian/templates/SIPconfig.xml @@ -10,9 +10,6 @@ diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml index 356175af12..33f1859c9f 100644 --- a/etc/SIPconfig.xml +++ b/etc/SIPconfig.xml @@ -15,9 +15,6 @@ min_servers='1' min_spare_servers='0' max_servers='1' - log_file='Sys::Syslog' - syslog_ident='koha_sip' - syslog_facility='local6' setsid="1" user='koha' group='koha' -- 2.39.2