Skip to content

Introduce dedicated logger channel for deprecations #13642

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

Conversation

l-vo
Copy link
Contributor

@l-vo l-vo commented May 5, 2020

Close #13631

@@ -120,6 +127,48 @@ done!

$ SYMFONY_DEPRECATIONS_HELPER=max[total]=999999 php ./bin/phpunit

Deprecations in logs
~~~~~~~~~~~~~~~~~~~~
If you use the Symfony default configuration, the deprecations are also logged in a ``prod.deprecations.log`` file (prod environment):
Copy link
Contributor

Choose a reason for hiding this comment

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

iirc this config is not enabled now by default in the recipe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you're right, it's not enabled but present in the recipe as a comment because as a rule of thumb you only need to log deprecations in prod when you plan to migrate to the next major. IMHO it may be considered as the default configuration even if it's not always enabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

Understood, but maybe rewrote mentioning that this need to be enable, as by default config, it is not the case, and one can understood it is and then never find this file :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes sorry; I didn't make attention that the problem was in this section, thank you 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated 🙂

@nicolas-grekas
Copy link
Member

Please review symfony/recipes#775 and update this PR accordingly if it looks good to you.

@l-vo l-vo force-pushed the log_deprecations_on_specific_channel branch from d647d6e to e4a78d9 Compare June 30, 2020 13:04
@javiereguiluz
Copy link
Member

Laurent, thanks for this contribution. However, we're closing it as "won't merge". Why? The feature that you created is nice ... but the nicest thing of it is its great discoverability. The needed config comes automatically via Flex (for new projects or those force-updating their recipes) and the new file is easily spot in the var/logs/ directory of the application, so I don't think we need to explain this explicitly to users. Thanks for understanding!

@l-vo l-vo deleted the log_deprecations_on_specific_channel branch October 30, 2020 15:40
@l-vo
Copy link
Contributor Author

l-vo commented Oct 30, 2020

@javiereguiluz No problem, I understand 🙂

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.

Log deprecations on a dedicated Monolog channel
5 participants