Skip to content
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

handle panics in MarshalLog, Error, String #299

Merged
merged 1 commit into from Feb 21, 2022

Commits on Feb 17, 2022

  1. handle panics in MarshalLog, Error, String

    The previous fix only covered fmt.Stringer.String in klog, but not klogr.
    error.Error and logr.Marshaler.MarshalLog have the same problem. The
    replacement string now captures the error, which makes it consistent with
    go-logr/logr#130.
    
    Two different corner cases may be handled differently:
    - panic for a nil object
    - panic for a valid object
    
    Only zapr v1.2.3 handles the panic in MarshalLog.
    pohly committed Feb 17, 2022
    Copy the full SHA
    708ae61 View commit details
    Browse the repository at this point in the history