You are here

public function CronJob::resumeLog in Ultimate Cron 8.2

Resume a previosly saved log.

Parameters

string $lock_id: The lock id of the log to resume.

Return value

LogEntry The log entry object.

Overrides CronJobInterface::resumeLog

File

src/Entity/CronJob.php, line 581

Class

CronJob
Class for handling cron jobs.

Namespace

Drupal\ultimate_cron\Entity

Code

public function resumeLog($lock_id) {
  $logger = $this
    ->getPlugin('logger');
  $log_entry = $logger
    ->load($this
    ->id(), $lock_id);
  $log_entry->finished = FALSE;
  \Drupal::service('logger.ultimate_cron')
    ->catchMessages($log_entry);
  return $log_entry;
}