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 <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2022-07-21 12:43:34 +00:00 committed by Tomas Cohen Arazi
parent 6d82b66a27
commit df69e14057
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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;