Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 909 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 909 Bytes

zaperr

CircleCI Coverage Status GoDoc License: MIT

Error wrapper for go.uber.org/zap

Usage

err = zaperr.Wrap(err, "failed to execute something",
    zap.Int("foo", 1),
    zap.String("bar", "baz"),
)

logger.Info("example", zaperr.ToField(err))

// Output:
// {"level":"info","msg":"example","error":{"foo":1,"bar":"baz","error":"failed to execute something: error","errorVerbose":"omitted..."}}