-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
pkg/log/zap: Adding ability to get client-go and trace level logs #1322
pkg/log/zap: Adding ability to get client-go and trace level logs #1322
Conversation
/cc @jmrodri @joelanford |
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.
LGTM after addressing comments.
Can you also add a line to the CHANGELOG for this change?
ce17a5b
to
c11d758
Compare
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.
Thanks, still LGTM 👍
/lgtm |
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.
LGTM
pkg/log/zap/flags.go
Outdated
if lvl < -3 { | ||
fs := flag.NewFlagSet("", flag.ContinueOnError) | ||
klog.InitFlags(fs) | ||
fs.Set("v", fmt.Sprintf("%v", -1*lvl)) |
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.
Check the returned error?
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.
/lgtm
Also it might be worth adding a line somewhere in the logging user doc to mention this behavior beyond just the CHANGELOG. |
New changes are detected. LGTM label has been removed. |
Description of the change:
Adding the ability to set the log level for klog if the zap-level is for enough verbosity.
Motivation for the change:
Allowing users to get more debug level logs with help when diagnosing problems.