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

android: add logging to see what's spamming editPrefs #586

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

kari-ts
Copy link
Collaborator

@kari-ts kari-ts commented Dec 9, 2024

@kari-ts kari-ts requested review from barnstar and agottardo December 9, 2024 21:14
Copy link
Collaborator

@agottardo agottardo left a comment

Choose a reason for hiding this comment

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

Can we add a check to ensure this doesn't accidentally ship in a stable release?

@kari-ts kari-ts force-pushed the kari/prefslog branch 2 times, most recently from 8c97fdc to 80b33ac Compare December 9, 2024 22:11
@kari-ts
Copy link
Collaborator Author

kari-ts commented Dec 9, 2024

Can we add a check to ensure this doesn't accidentally ship in a stable release?

We're using debug logs now, so to differentiate, I made this a verbose log and then added a CI check to detect verbose logs. Is this along the lines of what you were thinking?

@kari-ts kari-ts requested a review from agottardo December 9, 2024 22:11
@agottardo
Copy link
Collaborator

Can we add a check to ensure this doesn't accidentally ship in a stable release?

We're using debug logs now, so to differentiate, I made this a verbose log and then added a CI check to detect verbose logs. Is this along the lines of what you were thinking?

I simply meant something super-easy along the lines of

if Version.IsUnstable {
   // Log.d(stacktrace)
}

where Version.IsUnstable looks at the current version number to return true/false. Alternatively, you can do what we do on Apple platforms, where our TSLog.verbose (the equivalent) checks for a specific UserDefaults flag to be enabled before printing anything to the syslog.

There's value in preventing Log.v calls from entering a release branch, but I don't think that CI check as-is will work because CI checks out a commit rather than a branch. But I'm not a CI expert. Feel free to merge everything as it was, I was just making a nit suggestion.

@kari-ts kari-ts force-pushed the kari/prefslog branch 3 times, most recently from e8d6e64 to eabaed5 Compare December 10, 2024 00:17
@kari-ts kari-ts merged commit ebbc1b2 into main Dec 10, 2024
4 checks passed
@kari-ts kari-ts deleted the kari/prefslog branch December 10, 2024 00:26
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