File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,28 @@ If you use several handlers, you can also register a processor at the
159159handler level or at the channel level instead of registering it globally
160160(see the following sections).
161161
162+ .. tip ::
163+
164+ .. versionadded :: 4.2
165+ Processors can be autoconfigured since Symfony 4.2.
166+
167+ Processors implementing :class: `Symfony\\ Bridge\\ Monolog\\ Processor\\ ProcessorInterface `
168+ can have their ``monolog.processor `` tag added for you by Symfony when autoconfiguration
169+ is enabled. In this situation, this means creating a processor class might be all you
170+ need do to to have it up and running. It also means enabling the
171+ :class: `Symfony\\ Bridge\\ Monolog\\ Processor\\ TokenProcessor ` or the
172+ :class: `Symfony\\ Bridge\\ Monolog\\ Processor\\ WebProcessor ` in your Flex-enabled app is a
173+ one-liner:
174+
175+ .. code-block :: yaml
176+
177+ # config/services.yaml
178+ services :
179+ # Adds the current security token to log entries
180+ Symfony\Bridge\Monolog\Processor\TokenProcessor : ~
181+ # Adds the real client IP to log entries
182+ Symfony\Bridge\Monolog\Processor\WebProcessor : ~
183+
162184 Registering Processors per Handler
163185----------------------------------
164186
You can’t perform that action at this time.
0 commit comments