Skip to content

Conversation

@javiereguiluz
Copy link
Member

After reading this comment: #8235 (comment) I realized that some config paths are wrong for Monolog because the recipe (https://github.com/symfony/recipes/tree/master/symfony/monolog-bundle/3.1/config/packages) doesn't create any config file in config/packages/monolog.yaml (all files are defined per environment).

Most of the examples used config/packages/prod/monolog.yaml, so I used that too. It makes sense tome because you usually only carefully configure logs in prod. The only article where we maintain config/packages/dev/monolog.yaml would be logging/monolog_console.rst where I think it makes sense.

@Simperfit
Copy link
Contributor

@javiereguiluz Aren't new comers going to copy/paste theses files (at least it's what I see in workshops) ? It seems better to me to add them in dev instead of prod.

.. 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?

javiereguiluz added a commit that referenced this pull request Apr 27, 2018
This PR was squashed before being merged into the 4.0 branch (closes #9621).

Discussion
----------

Fixed the paths of the Monolog config files

After reading this comment: #8235 (comment)  I realized that some config paths are wrong for Monolog because the recipe (https://github.com/symfony/recipes/tree/master/symfony/monolog-bundle/3.1/config/packages) doesn't create any config file in `config/packages/monolog.yaml` (all files are defined per environment).

Most of the examples used `config/packages/prod/monolog.yaml`, so I used that too. It makes sense tome because you usually only carefully configure logs in `prod`. The only article where we maintain `config/packages/dev/monolog.yaml` would be `logging/monolog_console.rst` where I think it makes sense.

Commits
-------

9de898a Fixed the paths of the Monolog config files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants