You are here

protected function UpdateLogger::outputCli in Update helper 8

Same name and namespace in other branches
  1. 2.x src/UpdateLogger.php \Drupal\update_helper\UpdateLogger::outputCli()

Output logs in format suitable for console command and clear logs too.

1 call to UpdateLogger::outputCli()
UpdateLogger::output in src/UpdateLogger.php
Output log result, depending on channel used and clean log.

File

src/UpdateLogger.php, line 96

Class

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

Namespace

Drupal\update_helper

Code

protected function outputCli() {
  $console_logger = $this
    ->getCliLogger();
  foreach ($this
    ->cleanLogs() as $log_entry) {
    $console_logger
      ->log($log_entry[0], $log_entry[1]);
  }
}