MonologBundle.php 1.0KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Bundle\MonologBundle;
  11. use Symfony\Component\HttpKernel\Bundle\Bundle;
  12. use Symfony\Component\DependencyInjection\ContainerBuilder;
  13. use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\LoggerChannelPass;
  14. use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\DebugHandlerPass;
  15. use Symfony\Bundle\MonologBundle\DependencyInjection\Compiler\AddProcessorsPass;
  16. /**
  17. * Bundle.
  18. *
  19. * @author Jordi Boggiano <j.boggiano@seld.be>
  20. */
  21. class MonologBundle extends Bundle
  22. {
  23. public function build(ContainerBuilder $container)
  24. {
  25. parent::build($container);
  26. $container->addCompilerPass($channelPass = new LoggerChannelPass());
  27. $container->addCompilerPass(new DebugHandlerPass($channelPass));
  28. $container->addCompilerPass(new AddProcessorsPass());
  29. }
  30. }