-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Miscellaneous improvements about kvstore logging #28843
Merged
Merged
+61
−106
Conversation
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
The logging level can be configured through a dedicated flag (and environment variable). Let's drop this legacy ldflags variable, as not specific to the kvstore package only. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
This alias appeared to be used only in a unit test. Hence, let's just get rid of it. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
In all usages, the name is somewhat related to the watched prefix. Hence, let's just drop it, and consistently use the prefix in messages for additional clarity. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Detailed logs concerning each key/value event received by every watcher can be extremely verbose even at low scales, causing other useful kvstore related debug messages to be missed. Hence, let's output them only when verbose kvstore logs are enabled. This is also consistent with all other kvstore operations. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
934da65
to
83ed845
Compare
/test |
Avoid recreating a new logger instance for every operation, as it is an expensive operation in terms of allocations. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Only a type conversion, nothing useful to log there (even at trace level). Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
83ed845
to
d755dc5
Compare
Fixed unit-test failure. |
/test |
tklauser
approved these changes
Oct 31, 2023
jrajahalme
approved these changes
Nov 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/cleanup
This includes no functional changes.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
sig/kvstore
Impacts the KVStore package interactions.
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.
Please review commit by commit, and refer to the corresponding descriptions for additional information.