File tree 1 file changed +22
-0
lines changed
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
159
159
handler level or at the channel level instead of registering it globally
160
160
(see the following sections).
161
161
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
+
162
184
Registering Processors per Handler
163
185
----------------------------------
164
186
You can’t perform that action at this time.
0 commit comments