Monolog 1.x adds a default handler logging on STDERR when a logger has no registered handlers. This is NOT what what we want in Symfony, so in such cases, we add a "null" handler to avoid the issue. Note that Monolog 2.x does not register a default handler anymore, so this pass can be removed when MonologBundle minimum version of Monolog is bumped to 2.0.
See also: https://github.com/Seldaek/monolog/commit/ad37b7b2d11f300cbace9f5e84f855d329519e28
Author: Fabien Potencier (fabien@symfony.com)
Inheritance: implements Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
 public function testProcess()
 {
     $loggerChannelPass = $this->getMockBuilder('Symfony\\Bundle\\MonologBundle\\DependencyInjection\\Compiler\\LoggerChannelPass')->getMock();
     $loggerChannelPass->expects($this->any())->method('getChannels')->will($this->returnValue(array('foo', 'bar')));
     $container = new ContainerBuilder();
     $container->register('monolog.logger.foo', 'Monolog\\Logger');
     $container->register('monolog.logger.bar', 'Monolog\\Logger')->addMethodCall('pushHandler');
     $pass = new FixEmptyLoggerPass($loggerChannelPass);
     $pass->process($container);
     $calls = $container->getDefinition('monolog.logger.foo')->getMethodCalls();
     $this->assertCount(1, $calls);
     $this->assertSame('pushHandler', $calls[0][0]);
     $this->assertSame('monolog.handler.null_internal', (string) $calls[0][1][0]);
     $calls = $container->getDefinition('monolog.logger.bar')->getMethodCalls();
     $this->assertCount(1, $calls);
 }