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
Options to disable error listener and/or enable Monolog handler #247
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The approach overall seems good, thanks for tackling this; I've added some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 I've added two nitpicks, and you still have to fix and add tests.
@Jean85 Tests added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some answers to your questions. I've also added a few comments. Thanks for your continuing effort 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the changelog entries myself. Thank you very much for your contribution!
Hi @Jean85 @HypeMC could you explain me how this is supposed to work? When service In SentryExtension I found only:
and then configuration for parameters of this service. I see it removed when not enabled but I don't see it public. Adding to monolog config lines:
causes info that service with this id is not found 🤔 I had to add to my own services:
|
Services don't need to be public to be used. You can use proper injection to obtain them. |
Ok, I will double check why it could not find the service in my case until I redeclared it myself in my own services.yml I know they don't have to be public for dependency injection and most of them can be private |
@Jean85 looks like symfony cache strange behaviour which got me confused. Thanks for quick answer. After cleaning everything once more ( and also removing cache folder) somehow it started to work with |
Resolves #232.
As mentioned in the issue, having both the Monolog handler & the ErrorListener installed results in having duplicate entries.
I added a configuration option to disable the ErrorListener. I also added the ability to configure the Monolog handler through the bundle.
I still need to add some tests as well, but I wanted to get some feedback first on whether or not this approach is good.