Skip to content

Add the logger config option to ease setting a PSR-3 logger to debug the SDK #538

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
merged 1 commit into from
Jul 20, 2021
Merged

Add the logger config option to ease setting a PSR-3 logger to debug the SDK #538

merged 1 commit into from
Jul 20, 2021

Conversation

ste93cry
Copy link
Contributor

This solves #370 by adding the sentry.logger option which allows setting a custom PSR-3 logger to debug what's happening inside the SDK. By default the option is not set, which means that we fallback to the NullLogger service ID, and if it's not present we simply do nothing. I decided to not look for a service registered under the Psr\Log\LoggerInterface ID because I don't feel safe to log internal messages to the same logger that's used by the application because those may be reported back to Sentry creating a loop.

@ste93cry ste93cry added this to the 4.2 milestone Jul 18, 2021
@ste93cry ste93cry requested a review from Jean85 July 18, 2021 19:46
@ste93cry ste93cry merged commit 471b9e2 into getsentry:develop Jul 20, 2021
@ste93cry ste93cry deleted the add-psr3-logger-config-option branch July 20, 2021 11:00
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.

2 participants