-
Notifications
You must be signed in to change notification settings - Fork 406
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
some logs are not json format #2535
base: master
Are you sure you want to change the base?
some logs are not json format #2535
Conversation
Signed-off-by: fscnick <[email protected]>
Signed-off-by: fscnick <[email protected]>
@kevin85421 PTAL |
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.
Could you add a screenshot? CC @MortalHappiness: Could you shepherd this PR? I’m currently at KubeCon.
|
k8sLogger := k8szap.New(k8szap.UseFlagOptions(&opts)) | ||
ctrl.SetLogger(k8sLogger) | ||
klog.SetLogger(k8sLogger) | ||
|
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.
Remove this empty line
@fscnick From your screenshot, it seems that the logger information is lost. Can you try to also log the logger? I mean before the log is set to json format, we know that this log is from If it's technically infeasible, feel free to leave another comment. |
Why are these changes needed?
Some logs from client-go are not in JSON format.
According to kubernetes/client-go#18 (comment),
Calling
klog.SetLogger()
applies logs with JSON format from client-go.Related issue number
Closes #2512
Checks