From df69e140575608f03098d7ccdf73089d355efe65 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 This patch simply changes the routine to expect a hashref for info and to log the PID as object in action logs Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- C4/Log.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Log.pm b/C4/Log.pm index 05a81f1a26..2d520013a8 100644 --- a/C4/Log.pm +++ b/C4/Log.pm @@ -131,10 +131,11 @@ 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 $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', $$, $loginfo ) if C4::Context->preference('CronjobLog'); } 1; -- 2.39.5