v1.0.0-rc.2
Pre-release
Pre-release
akshayjshah
released this
23 Feb 22:53
·
445 commits
to master
since this release
This is the second release candidate for zap's stable release. It includes two breaking changes.
Breaking changes:
-
#316: Zap's global loggers are now fully concurrency-safe (previously, users had to ensure that
ReplaceGlobals
was called before the loggers were in use). However, they must now be accessed via theL()
andS()
functions. Users can update their projects withgofmt -r "zap.L -> zap.L()" -w . gofmt -r "zap.S -> zap.S()" -w .
-
#309 and #317: RC1 was mistakenly shipped with invalid JSON and YAML struct tags on all config structs. This release fixes the tags and adds static analysis to prevent similar bugs in the future.
Bugfixes:
- #321: Redirecting the standard library's
log
output now correctly reports the logger's caller.
Enhancements:
- #325 and #333: Zap now transparently supports non-standard, rich errors like those produced by
github.com/pkg/errors
. - #326: Though
New(nil)
continues to return a no-op logger,NewNop()
is now preferred. Users can update their projects withgofmt -r 'zap.New(nil) -> zap.NewNop()' -w .
. - #300: Incorrectly importing zap as
github.com/uber-go/zap
now returns a more informative error.
Thanks to @skipor and @chapsuk for their contributions to this release.