-
Notifications
You must be signed in to change notification settings - Fork 3.4k
pkg/logging: redirect klog output to logrus #10961
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
Merged
Merged
Conversation
This file contains hidden or 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
test-me-please |
ed0633a
to
3a9a5e1
Compare
michi-covalent
approved these changes
Apr 14, 2020
glibsm
reviewed
Apr 14, 2020
3a9a5e1
to
71aa686
Compare
test-me-please |
glibsm
approved these changes
Apr 14, 2020
rolinh
approved these changes
Apr 14, 2020
I think 1.7 backport makes sense, to pick up on issues in user environments. v1.7 will be supported for some time yet. |
klog currently redirects all of its output to stderr which might prevent users from detecting potentially error messages generated by klog since the logging format is different from logrus. Redirecting klog output to logrus will make the logging messages consistent. Master: ``` level=info msg="Waiting until all pre-existing resources related to policy have been received" subsys=k8s-watcher W0410 09:55:21.017837 31587 reflector.go:402] githu.... ``` With commit: ``` level=info msg="Waiting until all pre-existing resources related to policy have been received" subsys=k8s-watcher level=warning msg="github.com/cilium/cilium/pkg/k8s/watchers/network_p... level=info msg="github.com/cilium/cilium/pkg/k8s/watchers/network_p... ``` Unfortunately, klog as a bug / feature that prints the each log level message on each writer. This will be fixed upstream. Signed-off-by: André Martins <andre@cilium.io>
71aa686
to
ce1e848
Compare
test-me-please |
hit #10118 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
release-note/minor
This PR changes functionality that users may find relevant to operating Cilium.
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.
klog currently redirects all of its output to stderr which might
prevent users from detecting potentially error messages generated by
klog since the logging format is different from logrus. Redirecting klog
output to logrus will make the logging messages consistent.
Master:
With commit:
Unfortunately, klog as a bug / feature that prints the each log level
message on each writer. This will be fixed upstream.
Candidate to backport this to 1.7?