@@ -64,13 +64,15 @@ The following sections assume that Monolog is installed.
64
64
Where Logs are Stored
65
65
---------------------
66
66
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.
71
69
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 ``).
74
76
75
77
Handlers: Writing Logs to different Locations
76
78
---------------------------------------------
@@ -384,3 +386,4 @@ Learn more
384
386
.. _LoggerInterface : https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php
385
387
.. _`logrotate` : https://github.com/logrotate/logrotate
386
388
.. _`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