diff --git a/logging/processors.rst b/logging/processors.rst index e95ed2d16b3..e0a0b2b1ed0 100644 --- a/logging/processors.rst +++ b/logging/processors.rst @@ -159,58 +159,6 @@ If you use several handlers, you can also register a processor at the handler level or at the channel level instead of registering it globally (see the following sections). -.. tip:: - - .. versionadded:: 2.4 - The autoconfiguration of Monolog processors was introduced in Monolog bundle 2.4. - - If you're using the :ref:`default services.yaml configuration `, - processors implementing :class:`Monolog\\Processor\\ProcessorInterface` - are automatically registered as services and tagged with ``monolog.processor``, - so you can use them without adding any configuration. The same applies to the - built-in :class:`Symfony\\Bridge\\Monolog\\Processor\\TokenProcessor` and - :class:`Symfony\\Bridge\\Monolog\\Processor\\WebProcessor` processors, which - can be enabled as follows: - - .. configuration-block:: - - .. code-block:: yaml - - # config/services.yaml - services: - # Adds the current security token to log entries - Symfony\Bridge\Monolog\Processor\TokenProcessor: ~ - # Adds the real client IP to log entries - Symfony\Bridge\Monolog\Processor\WebProcessor: ~ - - .. code-block:: xml - - - - - - - - - - - - - - .. code-block:: php - - // config/services.php - use Symfony\Bridge\Monolog\Processor\TokenProcessor; - use Symfony\Bridge\Monolog\Processor\WebProcessor; - - // Adds the current security token to log entries - $container->register(TokenProcessor::class); - // Adds the real client IP to log entries - $container->register(WebProcessor::class); - Registering Processors per Handler ---------------------------------- @@ -298,3 +246,5 @@ the ``monolog.processor`` tag: $container ->register(SessionRequestProcessor::class) ->addTag('monolog.processor', array('channel' => 'main')); + +.. _ProcessorInterface: https://github.com/Seldaek/monolog/blob/master/src/Monolog/Processor/ProcessorInterface.php pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy