Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,25 @@ which they are defined:

.. _logging-handler-fingers_crossed:


.. note::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not use a note. That's feature.

Also, you should add .. versionadded:: 3.11

.. versionadded:: 3.5
The ``#[WithMonologChannel]`` attribute was introduced in Monolog 3.5.0.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The versionadded is the Symfony version.
This is the linter error :

Error: You are not allowed to use version "3.11.0". Only major version "7" is allowed.
Error: Please only provide ".. versionadded::" if the version is greater/equal "7.0"


You can use the ``enabled`` option to enable or disable a handler depending
on the environment. For example, you can keep logging in ``dev`` and ``prod``
but disable it in ``staging``:

.. code-block:: yaml

monolog:
handlers:
file_log:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
enabled: false # disables the handler

When ``enabled`` is set to ``false``, the handler is completely ignored.

Handlers that Modify Log Entries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down