From 9673265621d4e1440fa1e1b7029827d6772a7887 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 21 Jul 2022 12:43:34 +0000 Subject: [PATCH] Bug 31203: Alter cronlogaction to take a hash and pass PID as object for log This patch simply changes the routine to expect a hashref, now info and pid can be passed through for logging --- C4/Log.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Log.pm b/C4/Log.pm index 19e4a57ec1..86919acf3b 100644 --- a/C4/Log.pm +++ b/C4/Log.pm @@ -126,10 +126,12 @@ Logs the path and name of the calling script plus the information privided by pa #' sub cronlogaction { - my ($infos)=@_; + my $params = shift; + my $info = $params->{info}; + my $pid = $params->{pid}; my $loginfo = (caller(0))[1]; - $loginfo .= ' ' . $infos if $infos; - logaction( 'CRONJOBS', 'Run', undef, $loginfo ) if C4::Context->preference('CronjobLog'); + $loginfo .= ' ' . $info if $info; + logaction( 'CRONJOBS', 'Run', $pid, $loginfo ) if C4::Context->preference('CronjobLog'); } 1; -- 2.30.2