-
Notifications
You must be signed in to change notification settings - Fork 1.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
✨ Allow panic as an option to -zap-stacktrace-level" #1348
✨ Allow panic as an option to -zap-stacktrace-level" #1348
Conversation
Welcome @croomes! |
Hi @croomes. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/retest |
/test pull-controller-runtime-test-master Looks like un unrelated flake: "race detected during execution of test" in: |
out := Options{} | ||
UseFlagOptions(&fromFlags)(&out) | ||
|
||
Expect(out.StacktraceLevel.Enabled(zapcore.PanicLevel)).To(BeTrue()) |
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.
Isn't the more important test that its disabled on the next level, i.E. 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.
Added disable check for info
and error
.
This allows stack traces to be disabled for all but panic log entries. The Zap library doesn't have an option to completely disable stack traces.
5d4651a
to
9b98559
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.
/lgtm
/approve
thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, croomes The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This allows stack trace logging to be disabled for all but panic log entries.
The Zap
DisableStackTrace
config parameter (https://github.com/uber-go/zap/blob/master/config.go#L72) isn't available via theOption
interface, so it's not possible (or at least I couldn't find a way) to disable it completely via a user-added flag.Closes #1035