@@ -64,13 +64,15 @@ The following sections assume that Monolog is installed.
6464Where Logs are Stored
6565---------------------
6666
67- By default, log entries are written to the ``var/log/dev.log `` file when you're in
68- the ``dev `` environment. In the ``prod `` environment, logs are written to ``var/log/prod.log ``,
69- but *only * during a request where an error or high-priority log entry was made
70- (i.e. ``error() `` , ``critical() ``, ``alert() `` or ``emergency() ``).
67+ By default, log entries are written to the ``var/log/dev.log `` file when you're
68+ in the ``dev `` environment.
7169
72- To control this, you'll configure different *handlers * that handle log entries, sometimes
73- modify them, and ultimately store them.
70+ In the ``prod `` environment, logs are written to `STDERR PHP stream `_, which
71+ works best in modern containerized applications deployed to servers without
72+ disk write permissions.
73+
74+ If you prefer to store production logs in a file, set the ``path `` of your
75+ log handler(s) to the path of the file to use (e.g. ``var/log/prod.log ``).
7476
7577Handlers: Writing Logs to different Locations
7678---------------------------------------------
@@ -384,3 +386,4 @@ Learn more
384386.. _LoggerInterface : https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php
385387.. _`logrotate` : https://github.com/logrotate/logrotate
386388.. _`Monolog Configuration` : https://github.com/symfony/monolog-bundle/blob/master/DependencyInjection/Configuration.php#L25
389+ .. _`STDERR PHP stream` : https://www.php.net/manual/en/features.commandline.io-streams.php
0 commit comments