You are here

public static function UltimateCronJob::loadLatestLogEntries in Ultimate Cron 7.2

Load latest log entries.

Parameters

array $jobs: Jobs to load log entries for.

Return value

array Array of UltimateCronLogEntry objects.

File

./ultimate_cron.job.inc, line 533
Job class for Ultimate Cron.

Class

UltimateCronJob
Class for handling cron jobs.

Code

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->name] = $job;
  }
  $log_entries = array();
  foreach ($loggers as $logger => $jobs) {
    $log_entries += _ultimate_cron_plugin_require('logger', $logger)
      ->loadLatestLogEntries($jobs, $log_types);
  }
  return $log_entries;
}