10000 Fixed the paths of the Monolog config files by javiereguiluz · Pull Request #9621 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content
8000

Fixed the paths of the Monolog config files #9621

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
18 changes: 9 additions & 9 deletions logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ to write logs using the :phpfunction:`syslog` function:

.. code-block:: yaml

# config/packages/monolog.yaml
# config/packages/prod/monolog.yaml
Copy link
Member

Choose a reason for hiding this comment

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

What about the other formats below?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done! Now we need to make a decision about this: keep using prod for the reasons I gave in #9621 (comment) or change it to dev for the reasons given by Hamza in #9621 (comment)

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 add them to the dev file I think. It could be too confusing if you do not see all logs anymore during development. But maybe we should add a warning?

monolog:
handlers:
# this "file_log" key could be anything
Expand All @@ -92,7 +92,7 @@ to write logs using the :phpfunction:`syslog` function:

.. code-block:: xml

<!-- config/packages/monolog.xml -->
<!-- config/packages/prod/monolog.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -119,7 +119,7 @@ to write logs using the :phpfunction:`syslog` function:

.. code-block:: php

// config/packages/monolog.php
// config/packages/prod/monolog.php
$container->loadFromExtension('monolog', array(
'handlers' => array(
'file_log' => array(
Expand Down Expand Up @@ -150,7 +150,7 @@ one of the messages reaches an ``action_level``. Take this example:

.. code-block:: yaml

# config/packages/monolog.yaml
# config/packages/prod/monolog.yaml
monolog:
handlers:
filter_for_errors:
Expand All @@ -171,7 +171,7 @@ one of the messages reaches an ``action_level``. Take this example:

.. code-block:: xml

<!-- config/packages/monolog.xml -->
<!-- config/packages/prod/monolog.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -204,7 +204,7 @@ one of the messages reaches an ``action_level``. Take this example:

.. code-block:: php

// config/packages/monolog.php
// config/packages/prod/monolog.php
$container->loadFromExtension('monolog', array(
'handlers' => array(
'filter_for_errors' => array(
Expand Down Expand Up @@ -264,7 +264,7 @@ option of your handler to ``rotating_file``:

.. code-block:: yaml

# config/packages/dev/monolog.yaml
# config/packages/prod/monolog.yaml
monolog:
handlers:
main:
Expand All @@ -277,7 +277,7 @@ option of your handler to ``rotating_file``:

.. code-block:: xml

<!-- config/packages/dev/monolog.xml -->
<!-- config/packages/prod/monolog.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -301,7 +301,7 @@ option of your handler to ``rotating_file``:

.. code-block:: php

// config/packages/dev/monolog.php
// config/packages/prod/monolog.php
$container->loadFromExtension('monolog', array(
'handlers' => array(
'main' => array(
Expand Down
12 changes: 6 additions & 6 deletions logging/channels_handlers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ from the ``security`` channel:

.. code-block:: yaml

# config/packages/monolog.yaml
# config/packages/prod/monolog.yaml
monolog:
handlers:
security:
Expand All @@ -48,7 +48,7 @@ from the ``security`` channel:

.. code-block:: xml

<!-- config/packages/monolog.xml-->
<!-- config/packages/prod/monolog.xml-->
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:monolog="http://symfony.com/schema/dic/monolog"
Expand All @@ -75,7 +75,7 @@ from the ``security`` channel:

.. code-block:: php

// config/packages/monolog.php
// config/packages/prod/monolog.php
$container->loadFromExtension('monolog', array(
'handlers' => array(
'security' => array(
Expand Down Expand Up @@ -137,13 +137,13 @@ You can also configure additional channels without the need to tag your services

.. code-block:: yaml

# config/packages/monolog.yaml
# config/packages/prod/monolog.yaml
monolog:
channels: ['foo', 'bar']

.. code-block:: xml

<!-- config/packages/monolog.xml -->
<!-- config/packages/prod/monolog.xml -->
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:monolog="http://symfony.com/schema/dic/monolog"
Expand All @@ -160,7 +160,7 @@ You can also configure additional channels without the need to tag your services

.. code-block:: php

// config/packages/monolog.php
// config/packages/prod/monolog.php
$container->loadFromExtension('monolog', array(
'channels' => array(
'foo',
Expand Down
6 changes: 3 additions & 3 deletions logging/processors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Finally, set the formatter to be used on whatever handler you want:

.. code-block:: yaml

# config/packages/monolog.yaml
# config/ 6D4E packages/prod/monolog.yaml
monolog:
handlers:
main:
Expand All @@ -120,7 +120,7 @@ Finally, set the formatter to be used on whatever handler you want:

.. code-block:: xml

<!-- config/packages/monolog.xml -->
<!-- config/packages/prod/monolog.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -143,7 +143,7 @@ Finally, set the formatter to be used on whatever handler you want:

.. code-block:: php

// config/packages/monolog.php
// config/packages/prod/monolog.php
$container->loadFromExtension('monolog', array(
'handlers' => array(
'main' => array(
Expand Down
4 changes: 2 additions & 2 deletions reference/configuration/monolog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Full Default Configuration

.. code-block:: yaml

# config/packages/monolog.yaml
# config/packages/prod/monolog.yaml
monolog:
handlers:

Expand Down Expand Up @@ -80,7 +80,7 @@ Full Default Configuration

.. code-block:: xml

<!-- config/packages/monolog.xml -->
<!-- config/packages/prod/monolog.xml -->
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:monolog="http://symfony.com/schema/dic/monolog"
Expand Down
0