You are here

public function CronJob::getLogEntries in Ultimate Cron 8.2

Get log entries.

Parameters

int $limit: (optional) Number of log entries per page.

Return value

\Drupal\ultimate_cron\Logger\LogEntry[] Array of UltimateCronLogEntry objects.

Overrides CronJobInterface::getLogEntries

File

src/Entity/CronJob.php, line 512

Class

CronJob
Class for handling cron jobs.

Namespace

Drupal\ultimate_cron\Entity

Code

public function getLogEntries($log_types = ULTIMATE_CRON_LOG_TYPE_ALL, $limit = 10) {
  $log_types = $log_types == ULTIMATE_CRON_LOG_TYPE_ALL ? _ultimate_cron_define_log_type_all() : $log_types;
  return $this
    ->getPlugin('logger')
    ->getLogEntries($this
    ->id(), $log_types, $limit);
}