Reminder for me: Use PSR LogLevel which should be compatible and more generic.
Also put `$stream = $output instanceof StreamOutput ? $output->getStream() : 'php://output';
$logger->pushHandler(new StreamHandler($stream, $level));` into a separate protected method which is the only monolog specific implementation.