diff --git a/logging.rst b/logging.rst index 46e7c25e738..8a0cd772b61 100644 --- a/logging.rst +++ b/logging.rst @@ -343,7 +343,6 @@ Learn more logging/processors logging/monolog_regex_based_excludes logging/monolog_console - logging/disable_microsecond_precision .. _Monolog: https://github.com/Seldaek/monolog .. _LoggerInterface: https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php diff --git a/logging/disable_microsecond_precision.rst b/logging/disable_microsecond_precision.rst deleted file mode 100644 index d7b922d7cca..00000000000 --- a/logging/disable_microsecond_precision.rst +++ /dev/null @@ -1,42 +0,0 @@ -How to Disable Microseconds Precision (for a Performance Boost) -=============================================================== - -Setting the parameter ``use_microseconds`` to ``false`` forces the logger to reduce -the precision in the ``datetime`` field of the log messages from microsecond to second, -avoiding a call to the ``microtime(true)`` function and the subsequent parsing. -Disabling the use of microseconds can provide a small performance gain speeding up the -log generation. This is recommended for systems that generate a large number of log events. - -.. configuration-block:: - - .. code-block:: yaml - - # config/packages/monolog.yaml - monolog: - use_microseconds: false - # ... - - .. code-block:: xml - - - - - - - - - - - .. code-block:: php - - // config/packages/monolog.php - $container->loadFromExtension('monolog', array( - 'use_microseconds' => false, - // ... - )); diff --git a/reference/configuration/monolog.rst b/reference/configuration/monolog.rst index c2db56b574d..5ecda0c31db 100644 --- a/reference/configuration/monolog.rst +++ b/reference/configuration/monolog.rst @@ -74,6 +74,9 @@ Full Default Configuration id: ~ # Required (when the email_prototype is used) method: ~ formatter: ~ + # Set to false to use seconds (instead of microseconds) in + # the logs (gives a small performance boost). + use_microseconds: true .. code-block:: xml @@ -86,7 +89,7 @@ Full Default Configuration http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"> - +