Skip to content
Snippets Groups Projects

Always use job id for logging

Files
2
@@ -97,7 +97,10 @@ class SimpleCronCommands extends DrushCommands {
$status = $job->run(time(), $force);
if ($status) {
$this->getLogger('simple_cron')->notice('Execution of cron job @job is completed.', ['@job' => $job->id()]);
$this->getLogger('simple_cron')->notice('Execution of cron job @label (@id) is completed.', [
'@id' => $job->id(),
'@label' => $job->label(),
]);
}
else {
$this->getLogger('simple_cron')->error('Execution of cron job @job failed.', ['@job' => $job->id()]);
Loading