Skip to content

Commit e73cbb2

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Monolog] Improve how processors are applied to single channels
2 parents ae44760 + 3e594ad commit e73cbb2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

logging/processors.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ the ``monolog.processor`` tag:
265265
Registering Processors per Channel
266266
----------------------------------
267267

268-
You can register a processor per channel using the ``channel`` option of
269-
the ``monolog.processor`` tag:
268+
By default, processors are applied to all channels. Add the ``channel`` option
269+
to the ``monolog.processor`` tag to only apply a processor for the given channel:
270270

271271
.. configuration-block::
272272

@@ -276,7 +276,7 @@ the ``monolog.processor`` tag:
276276
services:
277277
App\Logger\SessionRequestProcessor:
278278
tags:
279-
- { name: monolog.processor, channel: main }
279+
- { name: monolog.processor, channel: 'app' }
280280
281281
.. code-block:: xml
282282
@@ -292,7 +292,7 @@ the ``monolog.processor`` tag:
292292
293293
<services>
294294
<service id="App\Logger\SessionRequestProcessor">
295-
<tag name="monolog.processor" channel="main"/>
295+
<tag name="monolog.processor" channel="app"/>
296296
</service>
297297
</services>
298298
</container>
@@ -304,7 +304,7 @@ the ``monolog.processor`` tag:
304304
// ...
305305
$container
306306
->register(SessionRequestProcessor::class)
307-
->addTag('monolog.processor', ['channel' => 'main']);
307+
->addTag('monolog.processor', ['channel' => 'app']);
308308
309309
.. _`Monolog`: https://github.com/Seldaek/monolog
310310
.. _`built-in Monolog processors`: https://github.com/Seldaek/monolog/tree/main/src/Monolog/Processor

0 commit comments

Comments
 (0)