public function onCommand(ConsoleCommandEvent $event)
    {
        $output = $event->getOutput();
        if ($output instanceof ConsoleOutputInterface) {
            $output = $output->getErrorOutput();
        }

        $this->setOutput($output);
    }
public function onCommand(ConsoleCommandEvent $event)
    {
        $output = $event->getOutput();
        if ($output instanceof ConsoleOutputInterface) {
            $output = $output->getErrorOutput();
        }

        $this->setOutput($output);
    }
public function onCommand ( ConsoleCommandEvent $ event ) { $ output = $ event -> getOutput ( ) ; if ( $ output instanceof ConsoleOutputInterface ) { $ output = $ output -> getErrorOutput ( ) ; } $ this -> setOutput ( $ output ) ; }
Before a command is executed, the handler gets activated and the console output
is set in order to know where to write the logs.
Before a command is executed the handler gets activated and the console output is set in order to know where to write the logs .