protected function UpdateLogger::getCliLogger in Update helper 8
Same name and namespace in other branches
- 2.x src/UpdateLogger.php \Drupal\update_helper\UpdateLogger::getCliLogger()
Returns console logger.
Return value
\Psr\Log\LoggerInterface Returns console logger.
1 call to UpdateLogger::getCliLogger()
- UpdateLogger::outputCli in src/
UpdateLogger.php - Output logs in format suitable for console command and clear logs too.
File
- src/
UpdateLogger.php, line 85
Class
- UpdateLogger
- Helper service for logging in update hooks provided by update helper.
Namespace
Drupal\update_helperCode
protected function getCliLogger() {
if (empty($this->cliLogger)) {
$this->cliLogger = new ConsoleLogger(new StreamOutput(fopen($this->cliOutput, 'w'), OutputInterface::VERBOSITY_DEBUG));
}
return $this->cliLogger;
}