FixEmptyLoggerPass
in package
implements
CompilerPassInterface
Fixes loggers with no handlers (by registering a "null" one).
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.
Tags
Interfaces, Classes and Traits
- CompilerPassInterface
- Interface that must be implemented by compilation passes.
Table of Contents
- $channelPass : mixed
- __construct() : mixed
- process() : mixed
- You can modify the container here before it is dumped to PHP code.
Properties
$channelPass
private
mixed
$channelPass
Methods
__construct()
public
__construct(LoggerChannelPass $channelPass) : mixed
Parameters
- $channelPass : LoggerChannelPass
Return values
mixed —process()
You can modify the container here before it is dumped to PHP code.
public
process(ContainerBuilder $container) : mixed
Parameters
- $container : ContainerBuilder