Skip to content

Commit c0d59c1

Browse files
Review
1 parent 56034cc commit c0d59c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

logging/processors.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ using a processor::
3030
$this->session = $session;
3131
}
3232

33+
// This method is called for each log record and process it.
34+
// Keep it optimized process, to not introduce any overhead.
3335
public function __invoke(array $record)
3436
{
3537
if (!$this->session->isStarted()) {
@@ -46,11 +48,6 @@ using a processor::
4648
}
4749
}
4850

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-
5451
Next, register your class as a service, as well as a formatter that uses the extra
5552
information:
5653

@@ -189,7 +186,8 @@ Symfony's MonologBridge provides processors that can be registered inside your a
189186
The ``RouteProcessor`` and the ``ConsoleCommandProcessor`` were introduced
190187
in Symfony 4.3.
191188

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.
193191

194192
Registering Processors per Handler
195193
----------------------------------
@@ -278,3 +276,5 @@ the ``monolog.processor`` tag:
278276
$container
279277
->register(SessionRequestProcessor::class)
280278
->addTag('monolog.processor', ['channel' => 'main']);
279+
280+
.. _Monolog: https://github.com/Seldaek/monolog

0 commit comments

Comments
 (0)