src/ServiceProvider/MonologServiceProvider.php
private function getBridge(\Pimple $app): callable
    {
        return function (OutputInterface $output) use ($app) {
            if (class_exists('Symfony\Bridge\Monolog\Handler\ConsoleHandler')
                && interface_exists('Symfony\Component\EventDispatcher\EventSubscriberInterface')) {
                $consoleHandler = new ConsoleHandler($output);
                /** @var \Monolog\Logger $logger */
                foreach ($app['loggers'] as $logger) {
                    $logger->pushHandler($consoleHandler);
                }
            }
        };
    }
private function getBridge(\Pimple $app): callable
    {
        return function (OutputInterface $output) use ($app) {
            if (class_exists('Symfony\Bridge\Monolog\Handler\ConsoleHandler')
                && interface_exists('Symfony\Component\EventDispatcher\EventSubscriberInterface')) {
                $consoleHandler = new ConsoleHandler($output);
                /** @var \Monolog\Logger $logger */
                foreach ($app['loggers'] as $logger) {
                    $logger->pushHandler($consoleHandler);
                }
            }
        };
    }
@param \Pimple $app

@return callable