You are here

protected function UpdateLogger::cleanLogs in Update helper 2.x

Same name and namespace in other branches
  1. 8 src/UpdateLogger.php \Drupal\update_helper\UpdateLogger::cleanLogs()

Clear logs and returns currenlty collected logs.

Return value

array Returns collected logs, since last clear.

2 calls to UpdateLogger::cleanLogs()
UpdateLogger::outputCli in src/UpdateLogger.php
Output logs in format suitable for console command and clear logs too.
UpdateLogger::outputHtml in src/UpdateLogger.php
Output logs in format suitable for HTML and clear logs too.

File

src/UpdateLogger.php, line 55

Class

UpdateLogger
Helper service for logging in update hooks provided by update helper.

Namespace

Drupal\update_helper

Code

protected function cleanLogs() {
  $logs = $this->logs;
  $this->logs = [];
  return $logs;
}