Logging use inconsistant naming: either Job label or Job Id

Created on 4 January 2024, 12 months ago

Problem/Motivation

// \Drupal\simple_cron\Commands\SimpleCronCommands::cronJobRun
$this->getLogger('simple_cron')->notice('Execution of cron job @job is completed.', ['@job' => $job->id()]);

// \Drupal\simple_cron\Entity\CronJob::run
$this->logger->warning('Cron job @job could not be run: missing plugin.', ['@job' => $this->label()]);
$this->logger->warning('Attempting to re-run @job cron while it is already running.', ['@job' => $this->label()]);

Steps to reproduce

Enable logging, create a job with a high frequency execution or a faulty cronjob with missing plugin, see different names appear in log

Proposed resolution

Use $job->id() everywhere

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇫🇷France O'Briat Nantes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024