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

Less verbose output for multierr #470

Merged
merged 2 commits into from
Jul 7, 2017
Merged

Less verbose output for multierr #470

merged 2 commits into from
Jul 7, 2017

Commits on Jul 6, 2017

  1. Less verbose output for multierr

    Following the discussions on #460, uber-go/multierr#6, and
    (most recently) uber-go/multierr#23, reduce log verbosity for
    `multierr`. This is fully backward-compatible with the last released
    version of zap.
    
    The small changes introduced here do two things:
    
    1. First, we either report `errorCauses` or `errorVerbose`, but not
       both.
    2. Second, we prefer `errorCauses` to `errorVerbose`.
    
    I think that this addresses our top-level wants without breaking any
    interfaces or removing behavior we've already shipped.
    
    If we ever decide to cut a new major release of zap, we should treat
    errors like durations and times - they're special types for which users
    choose a formatter.
    
    In a future release, we can add an `ErrorEncoder` interface that the
    JSON encoder and console encoder implement, and make the error field
    attempt an upcast into that type. That would let the user supply their
    own error encoder (much like they supply their own time and duration
    encoders now). Even if we do that, though, I suspect that we'll want to
    preserve the behavior here as the default.
    Akshay Shah committed Jul 6, 2017
    Configuration menu
    Copy the full SHA
    d8df53e View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2017

  1. Use type switch

    Akshay Shah committed Jul 7, 2017
    Configuration menu
    Copy the full SHA
    fa33d3b View commit details
    Browse the repository at this point in the history