CHANGELOG.md raw

Changelog

All notable changes to this project will be documented in this file.

This project adheres to Semantic Versioning.

1.27.0 (20 Feb 2024)

Enhancements:

Thanks to @defval, @dimmo, @arxeiss, and @MKrupauskas for their contributions to this release.

[#1378]: https://github.com/uber-go/zap/pull/1378 [#1399]: https://github.com/uber-go/zap/pull/1399 [#1406]: https://github.com/uber-go/zap/pull/1406 [#1416]: https://github.com/uber-go/zap/pull/1416

1.26.0 (14 Sep 2023)

Enhancements:

context.

Thanks to @hhk7734, @jquirke, and @cdvr1993 for their contributions to this release.

[#1297]: https://github.com/uber-go/zap/pull/1297 [#1319]: https://github.com/uber-go/zap/pull/1319 [#1350]: https://github.com/uber-go/zap/pull/1350

1.25.0 (1 Aug 2023)

This release contains several improvements including performance, API additions, and two new experimental packages whose APIs are unstable and may change in the future.

Enhancements:

Str and Strs for constructing String-like zap.Fields.

Thanks to @knight42, @dzakaammar, @bcspragu, and @rexywork for their contributions to this release.

[#1246]: https://github.com/uber-go/zap/pull/1246 [#1273]: https://github.com/uber-go/zap/pull/1273 [#1281]: https://github.com/uber-go/zap/pull/1281 [#1310]: https://github.com/uber-go/zap/pull/1310

1.24.0 (30 Nov 2022)

Enhancements:

current minimum enabled log level.

Thanks to @Abirdcfly, @craigpastro, @nnnkkk7, and @sashamelentyev for their contributions to this release.

[#1148]: https://github.coml/uber-go/zap/pull/1148 [#1185]: https://github.coml/uber-go/zap/pull/1185

1.23.0 (24 Aug 2022)

Enhancements:

LevelEnabler or Core.

that implement String() string.

[#1147]: https://github.com/uber-go/zap/pull/1147 [#1155]: https://github.com/uber-go/zap/pull/1155

1.22.0 (8 Aug 2022)

Enhancements:

arrays of objects. With these two constructors, you don't need to implement zapcore.ArrayMarshaler for use with zap.Array if those objects implement zapcore.ObjectMarshaler.

SugaredLogger with the provided options applied.

These functions provide a string joining behavior similar to fmt.Println.

logger for Fatal-level log entries. This defaults to exiting the program.

NewDevelopment to panic if the system was unable to build the logger.

a statement dynamically.

Thanks to @cardil, @craigpastro, @sashamelentyev, @shota3506, and @zhupeijun for their contributions to this release.

[#1071]: https://github.com/uber-go/zap/pull/1071 [#1079]: https://github.com/uber-go/zap/pull/1079 [#1080]: https://github.com/uber-go/zap/pull/1080 [#1088]: https://github.com/uber-go/zap/pull/1088 [#1108]: https://github.com/uber-go/zap/pull/1108 [#1118]: https://github.com/uber-go/zap/pull/1118

1.21.0 (7 Feb 2022)

Enhancements:

string.

Bugfixes:

Other changes:

AddStacktrace options are used together.

[#1047]: https://github.com/uber-go/zap/pull/1047 [#1048]: https://github.com/uber-go/zap/pull/1048 [#1052]: https://github.com/uber-go/zap/pull/1052 [#1058]: https://github.com/uber-go/zap/pull/1058

Thanks to @aerosol and @Techassi for their contributions to this release.

1.20.0 (4 Jan 2022)

Enhancements:

characters between log statements.

encoding of reflected log fields.

Bugfixes:

methods when the methods return.

Other changes:

[#554]: https://github.com/uber-go/zap/pull/554 [#989]: https://github.com/uber-go/zap/pull/989 [#1011]: https://github.com/uber-go/zap/pull/1011 [#1017]: https://github.com/uber-go/zap/pull/1017 [#1028]: https://github.com/uber-go/zap/pull/1028 [#1033]: https://github.com/uber-go/zap/pull/1033 [#1039]: https://github.com/uber-go/zap/pull/1039

Thanks to @psrajat, @lruggieri, @sammyrnycreal for their contributions to this release.

1.19.1 (8 Sep 2021)

Bugfixes:

[#1001]: https://github.com/uber-go/zap/pull/1001 [#1003]: https://github.com/uber-go/zap/pull/1003

1.19.0 (9 Aug 2021)

Enhancements:

better.

[#975]: https://github.com/uber-go/zap/pull/975 [#984]: https://github.com/uber-go/zap/pull/984

Thanks to @lancoLiu and @thockin for their contributions to this release.

1.18.1 (28 Jun 2021)

Bugfixes:

[#974]: https://github.com/uber-go/zap/pull/974

1.18.0 (28 Jun 2021)

Enhancements:

messages in-memory and flushes them periodically.

new zapcore.Clock interface.

methods don't match expectations.

zaptest/observer.

buffer.Buffer.

Thanks to @atrn0, @ernado, @heyanfu, @hnlq715, @zchee for their contributions to this release.

[#691]: https://github.com/uber-go/zap/pull/691 [#897]: https://github.com/uber-go/zap/pull/897 [#943]: https://github.com/uber-go/zap/pull/943 [#949]: https://github.com/uber-go/zap/pull/949 [#961]: https://github.com/uber-go/zap/pull/961 [#971]: https://github.com/uber-go/zap/pull/971

1.17.0 (25 May 2021)

Bugfixes:

vulnerabilities in dependencies.

Enhancements:

size from 96 to 80 bytes.

with the application/x-www-form-urlencoded content type.

Thanks to @ash2k, @FMLS, @jimmystewpot, @Oncilla, @tsoslow, @tylitianrui, @withshubh, and @wziww for their contributions to this release.

[#865]: https://github.com/uber-go/zap/pull/865 [#867]: https://github.com/uber-go/zap/pull/867 [#881]: https://github.com/uber-go/zap/pull/881 [#903]: https://github.com/uber-go/zap/pull/903 [#912]: https://github.com/uber-go/zap/pull/912 [#913]: https://github.com/uber-go/zap/pull/913 [#928]: https://github.com/uber-go/zap/pull/928 [#931]: https://github.com/uber-go/zap/pull/931 [#936]: https://github.com/uber-go/zap/pull/936

1.16.0 (1 Sep 2020)

Bugfixes:

without specifying a time or duration encoder.

Enhancements:

for custom layouts.

Thanks to @SteelPhase, @tmshn, @lixingwang, @wyxloading, @moul, @segevfiner, @andy-retailnext and @jcorbin for their contributions to this release.

[#629]: https://github.com/uber-go/zap/pull/629 [#697]: https://github.com/uber-go/zap/pull/697 [#828]: https://github.com/uber-go/zap/pull/828 [#835]: https://github.com/uber-go/zap/pull/835 [#843]: https://github.com/uber-go/zap/pull/843 [#844]: https://github.com/uber-go/zap/pull/844 [#852]: https://github.com/uber-go/zap/pull/852 [#854]: https://github.com/uber-go/zap/pull/854 [#861]: https://github.com/uber-go/zap/pull/861 [#862]: https://github.com/uber-go/zap/pull/862

1.15.0 (23 Apr 2020)

Bugfixes:

Enhancements:

allows disabling annotation of log entries with caller information if previously enabled with AddCaller.

NewSamplerWithOptions which supports a SamplerHook option. This option adds support for monitoring sampling decisions through a hook.

Thanks to @danielbprice for their contributions to this release.

[#804]: https://github.com/uber-go/zap/pull/804 [#812]: https://github.com/uber-go/zap/pull/812 [#806]: https://github.com/uber-go/zap/pull/806 [#813]: https://github.com/uber-go/zap/pull/813

1.14.1 (14 Mar 2020)

Bugfixes:

development-time dependencies.

be generated for arrays of time.Time objects when using string-based time formats.

Thanks to @YashishDua for their contributions to this release.

[#791]: https://github.com/uber-go/zap/pull/791 [#795]: https://github.com/uber-go/zap/pull/795 [#799]: https://github.com/uber-go/zap/pull/799

1.14.0 (20 Feb 2020)

Enhancements:

Thanks to @caibirdme for their contributions to this release.

[#771]: https://github.com/uber-go/zap/pull/771 [#773]: https://github.com/uber-go/zap/pull/773 [#775]: https://github.com/uber-go/zap/pull/775 [#786]: https://github.com/uber-go/zap/pull/786

1.13.0 (13 Nov 2019)

Enhancements:

to log pointers to primitives with support for nil values.

Thanks to @jbizzle for their contributions to this release.

[#758]: https://github.com/uber-go/zap/pull/758

1.12.0 (29 Oct 2019)

Enhancements:

[#751]: https://github.com/uber-go/zap/pull/751

1.11.0 (21 Oct 2019)

Enhancements:

Thanks to @juicemia, @uhthomas for their contributions to this release.

[#725]: https://github.com/uber-go/zap/pull/725 [#736]: https://github.com/uber-go/zap/pull/736

1.10.0 (29 Apr 2019)

Bugfixes:

string.

Enhancements:

loggers.

reflect-based encoder.

Thanks to @iaroslav-ciupin, @lelenanam, @joa, @NWilson for their contributions to this release.

[#657]: https://github.com/uber-go/zap/pull/657 [#706]: https://github.com/uber-go/zap/pull/706 [#610]: https://github.com/uber-go/zap/pull/610 [#675]: https://github.com/uber-go/zap/pull/675 [#704]: https://github.com/uber-go/zap/pull/704

1.9.1 (06 Aug 2018)

Bugfixes:

[#614]: https://github.com/uber-go/zap/pull/614

1.9.0 (19 Jul 2018)

Enhancements:

Thanks to @nfarah86, @AlekSi, @JeanMertz, @philippgille, @etsangsplk, and @dimroc for their contributions to this release.

[#602]: https://github.com/uber-go/zap/pull/602 [#572]: https://github.com/uber-go/zap/pull/572 [#606]: https://github.com/uber-go/zap/pull/606

1.8.0 (13 Apr 2018)

Enhancements:

library's logger.

Bugfixes:

Thanks to @DiSiqueira and @djui for their contributions to this release.

[#508]: https://github.com/uber-go/zap/pull/508 [#518]: https://github.com/uber-go/zap/pull/518 [#577]: https://github.com/uber-go/zap/pull/577 [#574]: https://github.com/uber-go/zap/pull/574

1.7.1 (25 Sep 2017)

Bugfixes:

[#504]: https://github.com/uber-go/zap/pull/504

1.7.0 (21 Sep 2017)

Enhancements:

to specify the level of the logged messages.

[#487]: https://github.com/uber-go/zap/pull/487

1.6.0 (30 Aug 2017)

Enhancements:

field validation in tests.

[#490]: https://github.com/uber-go/zap/pull/490 [#491]: https://github.com/uber-go/zap/pull/491

1.5.0 (22 Jul 2017)

Enhancements:

Bugfixes:

Thanks to @richard-tunein and @pavius for their contributions to this release.

[#477]: https://github.com/uber-go/zap/pull/477 [#465]: https://github.com/uber-go/zap/pull/465 [#460]: https://github.com/uber-go/zap/pull/460 [#470]: https://github.com/uber-go/zap/pull/470

1.4.1 (08 Jun 2017)

This release fixes two bugs.

Bugfixes:

[#435]: https://github.com/uber-go/zap/pull/435 [#444]: https://github.com/uber-go/zap/pull/444

1.4.0 (12 May 2017)

This release adds a few small features and is fully backward-compatible.

Enhancements:

override the Unix-style default.

variety of operations a bit simpler.

[#424]: https://github.com/uber-go/zap/pull/424 [#425]: https://github.com/uber-go/zap/pull/425 [#431]: https://github.com/uber-go/zap/pull/431

1.3.0 (25 Apr 2017)

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:

particularly useful when testing the SugaredLogger.

[#415]: https://github.com/uber-go/zap/pull/415 [#416]: https://github.com/uber-go/zap/pull/416

1.2.0 (13 Apr 2017)

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

Enhancements:

grpclog.Logger.

[#402]: https://github.com/uber-go/zap/pull/402

1.1.0 (31 Mar 2017)

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

Bugfixes:

zap's configuration struct.

Enhancements:

Thanks to @moitias for contributing to this release.

[#385]: https://github.com/uber-go/zap/pull/385 [#396]: https://github.com/uber-go/zap/pull/396 [#386]: https://github.com/uber-go/zap/pull/386

1.0.0 (14 Mar 2017)

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:

casting from []byte to string.

zap.Logger, and zap.SugaredLogger.

clash with other testing helpers.

Bugfixes:

for tab-separated console output.

work with concurrency-safe WriteSyncer implementations.

systems.

interoperability wrappers.

Enhancements:

built-in Config.

levels, and durations).

removes the last performance advantage that zap's encoders have over plugins.

WriteSyncers and lock the result.

Go 1.9).

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.

[#366]: https://github.com/uber-go/zap/pull/366 [#364]: https://github.com/uber-go/zap/pull/364 [#371]: https://github.com/uber-go/zap/pull/371 [#362]: https://github.com/uber-go/zap/pull/362 [#369]: https://github.com/uber-go/zap/pull/369 [#347]: https://github.com/uber-go/zap/pull/347 [#373]: https://github.com/uber-go/zap/pull/373 [#348]: https://github.com/uber-go/zap/pull/348 [#327]: https://github.com/uber-go/zap/pull/327 [#376]: https://github.com/uber-go/zap/pull/376 [#346]: https://github.com/uber-go/zap/pull/346 [#365]: https://github.com/uber-go/zap/pull/365 [#372]: https://github.com/uber-go/zap/pull/372

1.0.0-rc.3 (7 Mar 2017)

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

Bugfixes:

rather than []uint8.

Enhancements:

package-global logging functions, users can now construct a zap-backed log.Logger instance.

machinery are now omitted from stacktraces.

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

[#339]: https://github.com/uber-go/zap/pull/339 [#307]: https://github.com/uber-go/zap/pull/307 [#353]: https://github.com/uber-go/zap/pull/353 [#311]: https://github.com/uber-go/zap/pull/311

1.0.0-rc.2 (21 Feb 2017)

This is the second release candidate for zap's stable release. It includes two breaking changes.

Breaking changes:

(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 . `

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:

correctly reports the logger's caller.

Enhancements:

errors like those produced by github.com/pkg/errors.

now preferred. Users can update their projects with `gofmt -r 'zap.New(nil) -> zap.NewNop()' -w .`.

more informative error.

Thanks to @skipor and @chapsuk for their contributions to this release.

[#316]: https://github.com/uber-go/zap/pull/316 [#309]: https://github.com/uber-go/zap/pull/309 [#317]: https://github.com/uber-go/zap/pull/317 [#321]: https://github.com/uber-go/zap/pull/321 [#325]: https://github.com/uber-go/zap/pull/325 [#333]: https://github.com/uber-go/zap/pull/333 [#326]: https://github.com/uber-go/zap/pull/326 [#300]: https://github.com/uber-go/zap/pull/300

1.0.0-rc.1 (14 Feb 2017)

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:

need to update their code.

largely to extension authors is now in the zapcore package.

internals but provide a different user-facing API.

as configuration instead of code.

timer heap.

0.1.0-beta.1 (6 Feb 2017)

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 backward 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.