Skip to content
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

Change default log level to warning #4467

Open
1 task done
Tracked by #4741
philipphofmann opened this issue Oct 22, 2024 · 4 comments · Fixed by #4707
Open
1 task done
Tracked by #4741

Change default log level to warning #4467

philipphofmann opened this issue Oct 22, 2024 · 4 comments · Fixed by #4707
Assignees

Comments

@philipphofmann
Copy link
Member

philipphofmann commented Oct 22, 2024

Description

The default SDK log level is debug. When you turn on option.debug = true the SDK logs too much information, so warnings and errors get lost. Instead the SDK should log only warnings and above when option.debug = true. Users can manually set the diagnosticLevel to debug if required. When we detect a debug build, we turn on debug = true, so you get only the warnings and errors. We still need to discuss if we're going to handle this as a breaking change or not, and we should create a meta issue for this to align across all SDKs.

This is also required to surface severe SDK misconfiguration or other errors clearly to the user such as: #4566

🛑 Blocked by

Preview Give feedback
  1. philipphofmann
@kahest
Copy link
Member

kahest commented Dec 10, 2024

related: getsentry/sentry-native#888

@philipphofmann
Copy link
Member Author

@philprime, we still should change the default log level to warning. #4707 only changes always logging fatal message. I would like to keep this open.

@philipphofmann philipphofmann moved this from Done to Backlog in Mobile & Cross Platform SDK Jan 15, 2025
@armcknight
Copy link
Member

I just saw that PR, i'm not sure I'd overload a level to essentially indicate "ignore levels", and instead would have added another config parameter like SentryLog.configure(isDebug: false, diagnosticLevel: .whatever, logAllLevels: true). Did you discuss an option like this?

@philprime
Copy link
Contributor

@armcknight not sure if I understand your proposition. In my PR the logAlwaysLevel is defined as a constant and can not be configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

4 participants