diff --git a/logging.rst b/logging.rst index 0ad36031dd5..bded9ab72a1 100644 --- a/logging.rst +++ b/logging.rst @@ -92,8 +92,14 @@ In the ``prod`` environment, logs are written to `STDERR PHP stream`_, which works best in modern containerized applications deployed to servers without disk write permissions. -If you prefer to store production logs in a file, set the ``path`` of your -log handler(s) to the path of the file to use (e.g. ``var/log/prod.log``). +If you prefer to store production logs in a file, set the ``path`` option of your +log handler(s) to the desired file path (e.g. ``var/log/prod.log``). This directory +is created by Monolog if needed, so Symfony applications running on read-only +filesystems don't need to create it manually or make it writable. + +.. versionadded:: 7.3 + + The feature to create the log directory automatically was introduced in Symfony 7.3. Handlers: Writing Logs to different Locations ---------------------------------------------