You are here

public function LogEntry::finish in Ultimate Cron 8.2

Finish a log and save it if applicable.

File

src/Logger/LogEntry.php, line 93

Class

LogEntry
Class for Ultimate Cron log entries.

Namespace

Drupal\ultimate_cron\Logger

Code

public function finish() {
  if (!$this->finished) {
    \Drupal::service('logger.ultimate_cron')
      ->unCatchMessages($this);
    $this->end_time = microtime(TRUE);
    $this->finished = TRUE;
    $this
      ->save();
  }
}