public static function CronJob::loadLatestLogEntries in Ultimate Cron 8.2
Load latest log entries.
Parameters
array $jobs: Jobs to load log entries for.
Return value
array Array of UltimateCronLogEntry objects.
Overrides CronJobInterface::loadLatestLogEntries
File
- src/
Entity/ CronJob.php, line 550
Class
- CronJob
- Class for handling cron jobs.
Namespace
Drupal\ultimate_cron\EntityCode
public static function loadLatestLogEntries($jobs, $log_types = array(
ULTIMATE_CRON_LOG_TYPE_NORMAL,
)) {
$loggers = array();
foreach ($jobs as $job) {
$loggers[$job
->getPlugin('logger')->name][$job
->id()] = $job;
}
$log_entries = array();
foreach ($loggers as $logger => $jobs) {
$log_entries += ultimate_cron_plugin_load('logger', $logger)
->loadLatestLogEntries($jobs, $log_types);
}
return $log_entries;
}