Skip to content

Commit 42fdeb6

Browse files
committed
minor #11328 Adds documentation for monolog processors. (dbrumann)
This PR was merged into the 3.4 branch. Discussion ---------- 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. I tried not to interfere with #10244 as this introduces documentation for more processors added in 4.3, so that PR hopefully can build on this one. Replaces #8156 EUFOSSA Commits ------- 67f8c2c Adds documentation for monolog processors.
2 parents 5761199 + 67f8c2c commit 42fdeb6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

logging/processors.rst

+10
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,16 @@ If you use several handlers, you can also register a processor at the
160160
handler level or at the channel level instead of registering it globally
161161
(see the following sections).
162162

163+
Symfony's MonologBridge provides processors that can be registered inside your application.
164+
165+
* :class:`Symfony\\Bridge\\Monolog\\Processor\\DebugProcessor` adds additional information useful for debugging like a timestamp or an error message to the record.
166+
* :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.
167+
* :class:`Symfony\\Bridge\\Monolog\\Processor\\WebProcessor` overrides data from the request using the data inside Symfony's request object.
168+
169+
.. versionadded:: 3.4
170+
171+
The :class:`Symfony\\Bridge\\Monolog\\Processor\\TokenProcessor` class was added in Symfony 3.4.
172+
163173
Registering Processors per Handler
164174
----------------------------------
165175

0 commit comments

Comments
 (0)