Bug 42714: Adjust cronlogaction to use caller(1)

Since we are calling from within another module we need more caller information to
log the correct script

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Nick Clemens 2026-05-29 11:17:00 +00:00 committed by Pedro Amorim
parent b9ec31fe7b
commit 8f5c0abd09
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ sub cronlogaction {
my $info = $params->{info};
my $action = $params->{action};
$action ||= "Run";
my $loginfo = ( caller(0) )[1];
my $loginfo = ( caller(1) )[1];
$loginfo .= ' ' . $info if $info;
logaction( 'CRONJOBS', $action, $$, $loginfo ) if C4::Context->preference('CronjobLog');
}