-
Notifications
You must be signed in to change notification settings - Fork 535
sentry_sdk.errors DEBUG logs are emitted without debug=True #4266
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
Comments
Hey @alex-700 can you show me how you load your log_conf.yaml and where the Or maybe the |
Hi @antonpirker ! It can be seen from the files from the issue. The main idea is But since some logging handlers was installed the condition is blocking configure_logging which includes |
This reverts commit 3793084, which made the SDK consider parent loggers when determining if the Sentry SDK should log debug messages. However, we should not consider parent loggers, since we only want the SDK to log debug messages when configured to do so via `debug=True` (in `sentry_sdk.init`), the `SENTRY_DEBUG` environment variable, or via a specific logger configuration for `sentry_sdk.errors`. With 3793084, a custom root logger configuration would also cause SDK logs to be emitted. The issue 3793084 was meant to fix (#3944) appears to have been caused by user error, not a bug in the SDK. Fixes #4266
This reverts commit 3793084, which made the SDK consider parent loggers when determining if the Sentry SDK should log debug messages. However, we should not consider parent loggers, since we only want the SDK to log debug messages when configured to do so via `debug=True` (in `sentry_sdk.init`), the `SENTRY_DEBUG` environment variable, or via a specific logger configuration for `sentry_sdk.errors`. With 3793084, a custom root logger configuration would also cause SDK logs to be emitted. The issue 3793084 was meant to fix (#3944) appears to have been caused by user error, not a bug in the SDK. Fixes #4266
How do you use Sentry?
Self-hosted/on-premise
Version
2.25.1
Steps to Reproduce
There is simple FastAPI project.
pyproject.toml
main.py
log_conf.yaml
When I run it via
uvicorn
, the_DebugFilter
seems to be not added as filter.Expected Result
no DEBUG logs from sentry_sdk, while I do not use SENTRY_DEBUG (or debug=True).
Actual Result
There are a lot of DEBUG logs from sentry_sdk.
The text was updated successfully, but these errors were encountered: