You are here

class UltimateCronCacheLogEntry in Ultimate Cron 7.2

Class for using cache as storage for log entries.

Hierarchy

Expanded class hierarchy of UltimateCronCacheLogEntry

File

plugins/ultimate_cron/logger/cache.class.php, line 86
Cache logger for Ultimate Cron.

View source
class UltimateCronCacheLogEntry extends UltimateCronLogEntry {

  /**
   * Save log entry.
   */
  public function save() {
    if (!$this->lid) {
      return;
    }
    if ($this->log_type != ULTIMATE_CRON_LOG_TYPE_NORMAL) {
      return;
    }
    $job = _ultimate_cron_job_load($this->name);
    $settings = $job
      ->getSettings('logger');
    $expire = $settings['timeout'] > 0 ? time() + $settings['timeout'] : $settings['timeout'];
    cache_set('uc-name:' . $this->name, $this->lid, $settings['bin'], $expire);
    cache_set('uc-lid:' . $this->lid, $this
      ->getData(), $settings['bin'], $expire);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UltimateCronCacheLogEntry::save public function Save log entry. Overrides UltimateCronLogEntry::save
UltimateCronLogEntry::$end_time public property
UltimateCronLogEntry::$finished public property
UltimateCronLogEntry::$init_message public property
UltimateCronLogEntry::$job public property
UltimateCronLogEntry::$lid public property
UltimateCronLogEntry::$logger public property
UltimateCronLogEntry::$log_entry_fields public property
UltimateCronLogEntry::$log_entry_size public property
UltimateCronLogEntry::$log_type public property
UltimateCronLogEntry::$message public property
UltimateCronLogEntry::$name public property
UltimateCronLogEntry::$severity public property
UltimateCronLogEntry::$start_time public property
UltimateCronLogEntry::$uid public property
UltimateCronLogEntry::catchMessages public function Start catching watchdog messages.
UltimateCronLogEntry::finish public function Finish a log and save it if applicable.
UltimateCronLogEntry::formatDuration public function Format duration.
UltimateCronLogEntry::formatEndTime public function Format end time.
UltimateCronLogEntry::formatInitMessage public function Format initial message.
UltimateCronLogEntry::formatSeverity public function Format severity.
UltimateCronLogEntry::formatStartTime public function Format start time.
UltimateCronLogEntry::formatUser public function Format user.
UltimateCronLogEntry::getData public function Get current log entry data as an associative array.
UltimateCronLogEntry::getDuration public function Get duration.
UltimateCronLogEntry::log public function Re-implementation of watchdog().
UltimateCronLogEntry::setData public function Set current log entry data from an associative array.
UltimateCronLogEntry::unCatchMessages public function Stop catching watchdog messages.
UltimateCronLogEntry::watchdog public function Implements hook_watchdog().
UltimateCronLogEntry::__construct public function Constructor.