From 67f8c2cb33dde092675899e9a6d69ef25660e2c7 Mon Sep 17 00:00:00 2001 From: Denis Brumann Date: Sat, 6 Apr 2019 21:39:36 +0200 Subject: [PATCH] Adds documentation for monolog processors. Adds both a short description for existing processors as well as a note for the newly added TokenProcessor added in 3.4. Replaces #8156 --- logging/processors.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/logging/processors.rst b/logging/processors.rst index 6eb3635095c..e2aee48229b 100644 --- a/logging/processors.rst +++ b/logging/processors.rst @@ -160,6 +160,16 @@ 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). +Symfony's MonologBridge provides processors that can be registered inside your application. + +* :class:`Symfony\\Bridge\\Monolog\\Processor\\DebugProcessor` adds additional information useful for debugging like a timestamp or an error message to the record. +* :class:`Symfony\\Bridge\\Monolog\\Processor\\TokenProcessor` adds information from the current user's token to the record namely username, roles and whether the user is authenticated. +* :class:`Symfony\\Bridge\\Monolog\\Processor\\WebProcessor` overrides data from the request using the data inside Symfony's request object. + +.. versionadded:: 3.4 + + The :class:`Symfony\\Bridge\\Monolog\\Processor\\TokenProcessor` class was added in Symfony 3.4. + Registering Processors per Handler ----------------------------------