DependencyInjection/MonitoringCompilerPass.php
private function addLoggerReferenceToContainer (Definition $handlerDefinition, ContainerBuilder $container)
    {
        // first wrap logger in FingersCrossedHandler
        $monitoringDefinition = new Definition(FingersCrossedHandler::class, [
            $handlerDefinition,
            Logger::WARNING
        ]);
        $monitoringDefinition->setPublic(false);

        $container->setDefinition(self::MONOLOG_HANDLER_SERVICE_ID, $monitoringDefinition);
    }
private function addLoggerReferenceToContainer (Definition $handlerDefinition, ContainerBuilder $container)
    {
        // first wrap logger in FingersCrossedHandler
        $monitoringDefinition = new Definition(FingersCrossedHandler::class, [
            $handlerDefinition,
            Logger::WARNING
        ]);
        $monitoringDefinition->setPublic(false);

        $container->setDefinition(self::MONOLOG_HANDLER_SERVICE_ID, $monitoringDefinition);
    }
private function addLoggerReferenceToContainer ( Definition $ handlerDefinition , ContainerBuilder $ container ) { // first wrap logger in FingersCrossedHandler $ monitoringDefinition = new Definition ( FingersCrossedHandler :: class , [ $ handlerDefinition , Logger :: WARNING ] ) ; $ monitoringDefinition -> setPublic ( false ) ; $ container -> setDefinition ( self :: MONOLOG_HANDLER_SERVICE_ID , $ monitoringDefinition ) ; }
Adds the monolog handler to the service container

@param Definition       $handlerDefinition
@param ContainerBuilder $container
Adds the monolog handler to the service container