code: 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);
                  }
              }
          };
      }
docs: @param \Pimple $app
  
  @return callable