Skip to content

Releases: uber-go/zap

v1.3.0

25 Apr 15:40
Compare
Choose a tag to compare

This release adds an enhancement to zap's testing helpers as well as the ability to marshal an AtomicLevel. It is fully backward-compatible.

Enhancements:

  • #415: Add a substring-filtering helper to zap's observer. This is particularly useful when testing the SugaredLogger.
  • #416: Make AtomicLevel implement encoding.TextMarshaler.

v1.2.0

14 Apr 05:14
Compare
Choose a tag to compare

This release adds a gRPC compatibility wrapper. It is fully backward-compatible.

Enhancements:

  • #402: Add a zapgrpc package that wraps zap's Logger and implements grpclog.Logger.

v1.1.0

31 Mar 23:06
Compare
Choose a tag to compare

This release fixes two bugs and adds some enhancements to zap's testing helpers. It is fully backward-compatible.

Bugfixes:

  • #385: Fix caller path trimming on Windows.
  • #396: Fix a panic when attempting to use non-existent directories with zap's configuration struct.

Enhancements:

  • #386: Add filtering helpers to zaptest's observing logger.

Thanks to @moitias for contributing to this release.

v1.0.0

15 Mar 00:05
Compare
Choose a tag to compare

This is zap's first stable release. All exported APIs are now final, and no further breaking changes will be made in the 1.x release series.

Anyone using a semver-aware dependency manager should now pin to ^1.

Breaking changes:

  • #366: Add byte-oriented APIs to encoders to log UTF-8 encoded text without casting from []byte to string.
  • #364: To support buffering outputs, add Sync methods to zapcore.Core, zap.Logger, and zap.SugaredLogger.
  • #371: Rename the testutils package to zaptest, which is less likely to clash with other testing helpers.

Bugfixes:

  • #362: Make the ISO8601 time formatters fixed-width, which is friendlier for tab-separated console output.
  • #369: Remove the automatic locks in zapcore.NewCore, which allows zap to work with concurrency-safe WriteSyncer implementations.
  • #347: Stop reporting errors when trying to fsync standard out on Linux systems.
  • #373: Report the correct caller from zap's standard library interoperability wrappers.

Enhancements:

  • #348: Add a registry allowing third-party encodings to work with zap's built-in Config.
  • #327: Make the representation of logger callers configurable (like times, levels, and durations).
  • #376: Allow third-party encoders to use their own buffer pools, which removes the last performance advantage that zap's encoders have over plugins.
  • #346: Add CombineWriteSyncers, a convenience function to tee multiple WriteSyncers and lock the result.
  • #365: Make zap's stacktraces compatible with mid-stack inlining (coming in Go 1.9).
  • #372: Export zap's observing logger as zaptest/observer. This makes it easier for particularly punctilious users to unit test their application's logging.

Thanks to @suyash, @htrendev, @flisky, @Ulexus, and @skipor for their contributions to this release.

v1.0.0-rc.3

07 Mar 21:49
Compare
Choose a tag to compare
v1.0.0-rc.3 Pre-release
Pre-release

This is the third release candidate for zap's stable release. There are no breaking changes.

Bugfixes:

  • #339: Byte slices passed to zap.Any are now correctly treated as binary blobs rather than []uint8.

Enhancements:

  • #307: Users can opt into colored output for log levels.
  • #353: In addition to hijacking the output of the standard library's package-global logging functions, users can now construct a zap-backed log.Logger instance.
  • #311: Frames from common runtime functions and some of zap's internal machinery are now omitted from stacktraces.

Thanks to @ansel1 and @suyash for their contributions to this release.

v1.0.0-rc.2

23 Feb 22:53
Compare
Choose a tag to compare
v1.0.0-rc.2 Pre-release
Pre-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 the L() and S() functions. Users can update their projects with

    gofmt -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 with gofmt -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.

v1.0.0-rc.1

15 Feb 02:09
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release

This is the first release candidate for zap's stable release. There are multiple breaking changes and improvements from the pre-release version. Most notably:

  • Zap's import path is now "go.uber.org/zap" — all users will need to update their code.
  • User-facing types and functions remain in the zap package. Code relevant largely to extension authors is now in the zapcore package.
  • The zapcore.Core type makes it easy for third-party packages to use zap's internals but provide a different user-facing API.
  • Logger is now a concrete type instead of an interface.
  • A less verbose (though slower) logging API is included by default.
  • Package-global loggers L and S are included.
  • A human-friendly console encoder is included.
  • A declarative config struct allows common logger configurations to be managed as configuration instead of code.
  • Sampling is more accurate, and doesn't depend on the standard library's shared timer heap.

v0.1.0-beta.1

14 Feb 04:49
Compare
Choose a tag to compare
v0.1.0-beta.1 Pre-release
Pre-release

This is a minor version, tagged to allow users to pin to the pre-1.0 APIs and upgrade at their leisure. Since this is the first tagged release, there are no backwards compatibility concerns and all functionality is new.

Early zap adopters should pin to the 0.1.x minor version until they're ready to upgrade to the upcoming stable release.