-
Notifications
You must be signed in to change notification settings - Fork 610
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
Improved opt-in logging support #7437
Merged
PeterJohnson
merged 27 commits into
wpilibsuite:main
from
Daniel1464:opt-in-logging-without-logged-anno
Dec 4, 2024
+215
−18
Merged
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
dc0d3d8
Testing opt-in logging without @Logged
Daniel1464 a14906f
Fixed problems...hopefully
Daniel1464 a62ee22
Fixed config logic
Daniel1464 e775a09
More attempted fixes
Daniel1464 15b5b98
Revert back to old isLoggable behavior
Daniel1464 844d498
Pretty much working now
Daniel1464 0bc9627
Reverted problematic changes
Daniel1464 ab66b81
Formatting fixes
github-actions[bot] 2ad4fa7
Revert "Formatting fixes"
SamCarlberg 53f47a2
Revert "Reverted problematic changes"
SamCarlberg 2253477
Revert "Pretty much working now"
SamCarlberg b7d58a9
Broaden criteria for a loggable type
SamCarlberg 2642d4a
Formatting fixes
github-actions[bot] ce6ffa6
Updated opt-in logging test
Daniel1464 49dcf06
Formatting fixes
github-actions[bot] b68cbb5
Java format
Daniel1464 bd71d20
Merge branch 'main' into opt-in-logging-without-logged-anno
Daniel1464 92cc005
Fixed inner class behavior
Daniel1464 a655354
Made logger order alphabetical,
Daniel1464 7a2a16a
Formatting fixes
github-actions[bot] ee5449e
Remove star-projected import
Daniel1464 99d77a4
Java format(again)
Daniel1464 bd2f01d
Merge branch 'wpilibsuite:main' into opt-in-logging-without-logged-anno
Daniel1464 92a760f
Renamed last uses of "dataLogger" with "backend"
Daniel1464 f28ede6
Separated opt-in field and method tests
Daniel1464 5412337
Java format
Daniel1464 8cbeee3
Added shouldNotLog test
Daniel1464 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These would be better in a separate test, so we can check that just a logged field is enough to make a class logged, and that just a logged method is also enough. Having both in one test means it's ambiguous, and also means that if either field or method detection breaks (but not both), then it wouldn't be caught by the test cases.
Additionally, it'd be good to have another test to cover the null case of a class with no
@Logged
annotation and with no implicitly logged members to make sure we don't generate loggers for things that users didn't opt into