@@ -323,49 +323,6 @@ specific channel (``app`` by default), use the ``monolog.logger`` tag with the
323
323
``channel `` property as explained in the
324
324
:ref: `Dependency Injection reference <dic_tags-monolog >`.
325
325
326
- How to Disable Microseconds Precision (for a Performance Boost)
327
- ---------------------------------------------------------------
328
-
329
- Setting the parameter ``use_microseconds `` to ``false `` forces the logger to reduce
330
- the precision in the ``datetime `` field of the log messages from microsecond to second,
331
- avoiding a call to the ``microtime(true) `` function and the subsequent parsing.
332
- Disabling the use of microseconds can provide a small performance gain speeding up the
333
- log generation. This is recommended for systems that generate a large number of log events.
334
-
335
- .. configuration-block ::
336
-
337
- .. code-block :: yaml
338
-
339
- # config/packages/monolog.yaml
340
- monolog :
341
- use_microseconds : false
342
- # ...
343
-
344
- .. code-block :: xml
345
-
346
- <!-- config/packages/monolog.xml -->
347
- <?xml version =" 1.0" encoding =" UTF-8" ?>
348
- <container xmlns =" http://symfony.com/schema/dic/services"
349
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
350
- xmlns : monolog =" http://symfony.com/schema/dic/monolog"
351
- xsi : schemaLocation =" http://symfony.com/schema/dic/services
352
- http://symfony.com/schema/dic/services/services-1.0.xsd
353
- http://symfony.com/schema/dic/monolog
354
- http://symfony.com/schema/dic/monolog/monolog-1.0.xsd" >
355
-
356
- <monolog : config use-microseconds =" false" >
357
- <!-- ... -->
358
- </monolog : config >
359
- </container >
360
-
361
- .. code-block :: php
362
-
363
- // config/packages/monolog.php
364
- $container->loadFromExtension('monolog', array(
365
- 'use_microseconds' => false,
366
- // ...
367
- ));
368
-
369
326
Adding extra Data to each Log (e.g. a unique request token)
370
327
-----------------------------------------------------------
371
328
0 commit comments