Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

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.

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

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