DependencyInjection/MonitoringCompilerPass.php
private function registerMonologHandlerInAllChannels (ContainerBuilder $container)
    {
        $monitoringReference = new Reference(self::MONOLOG_HANDLER_SERVICE_ID);

        // push reference as handler to every logger in the system
        foreach ($container->getDefinitions() as $key => $definition)
        {
            if (0 === strpos($key, "monolog.logger."))
            {
                $definition->addMethodCall("pushHandler", [$monitoringReference]);
            }
        }
    }
private function registerMonologHandlerInAllChannels (ContainerBuilder $container)
    {
        $monitoringReference = new Reference(self::MONOLOG_HANDLER_SERVICE_ID);

        // push reference as handler to every logger in the system
        foreach ($container->getDefinitions() as $key => $definition)
        {
            if (0 === strpos($key, "monolog.logger."))
            {
                $definition->addMethodCall("pushHandler", [$monitoringReference]);
            }
        }
    }
private function registerMonologHandlerInAllChannels ( ContainerBuilder $ container ) { $ monitoringReference = new Reference ( self :: MONOLOG_HANDLER_SERVICE_ID ) ; // push reference as handler to every logger in the system foreach ( $ container -> getDefinitions ( ) as $ key => $ definition ) { if ( 0 === strpos ( $ key , "monolog.logger." ) ) { $ definition -> addMethodCall ( "pushHandler" , [ $ monitoringReference ] ) ; } } }
Registers the monolog handler in all channels

@param ContainerBuilder $container
Registers the monolog handler in all channels