@@ -30,6 +30,8 @@ using a processor::
30
30
$this->session = $session;
31
31
}
32
32
33
+ // This method is called for each log record and process it.
34
+ // Keep it optimized process, to not introduce any overhead.
33
35
public function __invoke(array $record)
34
36
{
35
37
if (!$this->session->isStarted()) {
@@ -46,11 +48,6 @@ using a processor::
46
48
}
47
49
}
48
50
49
- .. note ::
50
-
51
- As every log record is process by all registred processors, you must be very careful when you create one processor.
52
- It has to be an optimized process, to not introduce any overhead.
53
-
54
51
Next, register your class as a service, as well as a formatter that uses the extra
55
52
information:
56
53
@@ -189,7 +186,8 @@ Symfony's MonologBridge provides processors that can be registered inside your a
189
186
The ``RouteProcessor `` and the ``ConsoleCommandProcessor `` were introduced
190
187
in Symfony 4.3.
191
188
192
- Note that Monolog have also some built in processors ready to use.
189
+ Monolog _ also have built in processors ready to use inside your application.
190
+ Read the librairy documenetation to learn more.
193
191
194
192
Registering Processors per Handler
195
193
----------------------------------
@@ -278,3 +276,5 @@ the ``monolog.processor`` tag:
278
276
$container
279
277
->register(SessionRequestProcessor::class)
280
278
->addTag('monolog.processor', ['channel' => 'main']);
279
+
280
+ .. _Monolog : https://github.com/Seldaek/monolog
0 commit comments