CacheTool\Monolog\ConsoleHandler::setOutput PHP Method

setOutput() public method

Sets the console output to use for printing logs.
public setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface The console output to use
    public function setOutput(OutputInterface $output)
    {
        $this->output = $output;
    }

Usage Example

 /**
  * {@inheritDoc}
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     $handler = new ConsoleHandler();
     $handler->setOutput($output);
     $this->logger->pushHandler($handler);
     $exitCode = parent::doRun($input, $output);
     $handler->close();
     return $exitCode;
 }