You are here

public function UltimateCronLogger::catchMessages in Ultimate Cron 7.2

Begin capturing messages.

Parameters

UltimateCronLogEntry $log_entry: The log entry that should capture messages.

File

./ultimate_cron.plugin.inc, line 1211
Plugin framework for Ultimate Cron.

Class

UltimateCronLogger
Abstract class for Ultimate Cron loggers.

Code

public function catchMessages($log_entry) {
  $class = get_class($this);
  if (!isset($class::$log_entries)) {
    $class::$log_entries = array();

    // Since we may already be inside a drupal_register_shutdown_function()
    // we cannot use that. Use PHPs register_shutdown_function() instead.
    ultimate_cron_register_shutdown_function(array(
      $class,
      'catchMessagesShutdownWrapper',
    ), $class);
  }
  $class::$log_entries[$log_entry->lid] = $log_entry;
}