Skip to content

Conversation

@N3M0dropserver
Copy link

Description

feature/chore to allow for enabling and disabling [sentry] debug logs. I was getting my container and other log systems filled with logs like this:

[sentry] [LogsBatcher] Flushing 31 logs
[sentry] Get response: `{"id":"f42674c3591b41dfa855d216760a9ea8"}`

Totally get having the debug logs there and I understand their use but I wanted the ability to disable them.

Perhaps another approach could be to make them traces at the trace/debug level if tracing flag is enabled that way people could opt in with level filters?

For now I've just feature flagged the macro to a no-op when used if the debug_logs flag is not enabled.

Happy for input or thoughts but I would personally love this.

Issues

N/A

Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

The debug output defaults to false and is enabled by the debug option, which I guess you have enabled, given that you get that output.

Our example configuration does include the debug: true to help folks get feedback in their initial setup, but its recommended to turn off afterwards.

Though I think this is a worthwhile contribution to actually remove all this code at compile time if you definitely do not want debug output, and rather want to optimize for smaller codesize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants