Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Document the new enabled option for Monolog handlers#21517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Arkalo2 wants to merge2 commits intosymfony:7.3
base:7.3
Choose a base branch
Loading
fromArkalo2:doc/loggin-add-documentation-for-enabled-handler-option
Open
Changes fromall commits
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
21 changes: 21 additions & 0 deletionslogging.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -250,6 +250,27 @@

.. _logging-handler-fingers_crossed:


.. versionadded:: 3.11.0

Check failure on line 254 in logging.rst

View workflow job for this annotation

GitHub Actions/ Lint (DOCtor-RST)

Please only provide ".. versionadded::" if the version is greater/equal "7.0"

Check failure on line 254 in logging.rst

View workflow job for this annotation

GitHub Actions/ Lint (DOCtor-RST)

You are not allowed to use version "3.11.0". Only major version "7" is allowed.

The ``enabled`` option was introduced in Monolog 3.11.0.

Check failure on line 256 in logging.rst

View workflow job for this annotation

GitHub Actions/ Lint (DOCtor-RST)

Please remove trailing whitespace

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

[8]ページ先頭

©2009-2025 Movatter.jp