Skip to content

Fix capture of console errors when the register_error_listener option is disabled #428

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

Merged

Conversation

ste93cry
Copy link
Contributor

Fixes #424: I made the ConsoleErrorListener listener configurable via constructor in regards to its ability of logging console errors. It's common in the Symfony world to use Monolog as logging tool, and if both this listener and the Monolog handler provided by the main PHP SDK capture the errors then logging will be duplicated.

@ste93cry ste93cry added this to the 4.0 milestone Jan 25, 2021
@ste93cry ste93cry requested a review from Jean85 January 25, 2021 19:59
Copy link
Contributor

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

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

LGTM 👍 this way it's really BC.

@Jean85 Jean85 merged commit 5f67fd3 into master Jan 26, 2021
@Jean85 Jean85 deleted the fix-capture-of-console-errors-when-error-listener-is-disabled branch January 26, 2021 07:31
@simPod
Copy link
Contributor

simPod commented Jan 26, 2021

Thank you. I have it deployed for 7h already and no duplicate event appeared.

Jean85 pushed a commit to rjd22/sentry-symfony that referenced this pull request Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Way to disable ConsoleCommandListener from sending the event to Sentry
3 participants