Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 77b7f55

Browse filesBrowse files
committed
Merge branch '5.3' into 5.4
* 5.3: [Logger] Update the location of prod logs
2 parents dc88d5e + 50c3276 commit 77b7f55
Copy full SHA for 77b7f55

File tree

Expand file treeCollapse file tree

1 file changed

+9
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-6
lines changed

‎logging.rst

Copy file name to clipboardExpand all lines: logging.rst
+9-6Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ The following sections assume that Monolog is installed.
6464
Where 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

7577
Handlers: 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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.