Logger::ERROR, OutputInterface::VERBOSITY_NORMAL => Logger::WARNING, OutputInterface::VERBOSITY_VERBOSE => Logger::NOTICE, OutputInterface::VERBOSITY_VERY_VERBOSE => Logger::INFO, OutputInterface::VERBOSITY_DEBUG => Logger::DEBUG, ); * @var OutputInterface */ protected $output; /** * @param OutputInterface $output */ public function __construct(OutputInterface $output) { parent::__construct(static::$levels[$output->getVerbosity()]); $this->output = $output; } /** * Write a log entry to the terminal. * @param array $record */ protected function write(array $record) { $this->output->writeln((string)$record['formatted']); } }