github.com/Laisky/zap@v1.27.0/CHANGELOG.md (about)

     1  # Changelog
     2  All notable changes to this project will be documented in this file.
     3  
     4  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
     5  
     6  ## 1.27.0 (20 Feb 2024)
     7  Enhancements:
     8  * [#1378][]: Add `WithLazy` method for `SugaredLogger`.
     9  * [#1399][]: zaptest: Add `NewTestingWriter` for customizing TestingWriter with more flexibility than `NewLogger`.
    10  * [#1406][]: Add `Log`, `Logw`, `Logln` methods for `SugaredLogger`.
    11  * [#1416][]: Add `WithPanicHook` option for testing panic logs.
    12  
    13  Thanks to @defval, @dimmo, @arxeiss, and @MKrupauskas for their contributions to this release.
    14  
    15  [#1378]: https://github.com/uber-go/zap/pull/1378
    16  [#1399]: https://github.com/uber-go/zap/pull/1399
    17  [#1406]: https://github.com/uber-go/zap/pull/1406
    18  [#1416]: https://github.com/uber-go/zap/pull/1416
    19  
    20  ## 1.26.0 (14 Sep 2023)
    21  Enhancements:
    22  * [#1297][]: Add Dict as a Field.
    23  * [#1319][]: Add `WithLazy` method to `Logger` which lazily evaluates the structured
    24  context.
    25  * [#1350][]: String encoding is much (~50%) faster now.
    26  
    27  Thanks to @hhk7734, @jquirke, and @cdvr1993 for their contributions to this release.
    28  
    29  [#1297]: https://github.com/uber-go/zap/pull/1297
    30  [#1319]: https://github.com/uber-go/zap/pull/1319
    31  [#1350]: https://github.com/uber-go/zap/pull/1350
    32  
    33  ## 1.25.0 (1 Aug 2023)
    34  
    35  This release contains several improvements including performance, API additions,
    36  and two new experimental packages whose APIs are unstable and may change in the
    37  future.
    38  
    39  Enhancements:
    40  * [#1246][]: Add `zap/exp/zapslog` package for integration with slog.
    41  * [#1273][]: Add `Name` to `Logger` which returns the Logger's name if one is set.
    42  * [#1281][]: Add `zap/exp/expfield` package which contains helper methods
    43  `Str` and `Strs` for constructing String-like zap.Fields.
    44  * [#1310][]: Reduce stack size on `Any`.
    45  
    46  Thanks to @knight42, @dzakaammar, @bcspragu, and @rexywork for their contributions
    47  to this release.
    48  
    49  [#1246]: https://github.com/uber-go/zap/pull/1246
    50  [#1273]: https://github.com/uber-go/zap/pull/1273
    51  [#1281]: https://github.com/uber-go/zap/pull/1281
    52  [#1310]: https://github.com/uber-go/zap/pull/1310
    53  
    54  ## 1.24.0 (30 Nov 2022)
    55  
    56  Enhancements:
    57  * [#1148][]: Add `Level` to both `Logger` and `SugaredLogger` that reports the
    58    current minimum enabled log level.
    59  * [#1185][]: `SugaredLogger` turns errors to zap.Error automatically.
    60  
    61  Thanks to @Abirdcfly, @craigpastro, @nnnkkk7, and @sashamelentyev for their
    62  contributions to this release.
    63  
    64  [#1148]: https://github.coml/uber-go/zap/pull/1148
    65  [#1185]: https://github.coml/uber-go/zap/pull/1185
    66  
    67  ## 1.23.0 (24 Aug 2022)
    68  
    69  Enhancements:
    70  * [#1147][]: Add a `zapcore.LevelOf` function to determine the level of a
    71    `LevelEnabler` or `Core`.
    72  * [#1155][]: Add `zap.Stringers` field constructor to log arrays of objects
    73    that implement `String() string`.
    74  
    75  [#1147]: https://github.com/uber-go/zap/pull/1147
    76  [#1155]: https://github.com/uber-go/zap/pull/1155
    77  
    78  ## 1.22.0 (8 Aug 2022)
    79  
    80  Enhancements:
    81  * [#1071][]: Add `zap.Objects` and `zap.ObjectValues` field constructors to log
    82    arrays of objects. With these two constructors, you don't need to implement
    83    `zapcore.ArrayMarshaler` for use with `zap.Array` if those objects implement
    84    `zapcore.ObjectMarshaler`.
    85  * [#1079][]: Add `SugaredLogger.WithOptions` to build a copy of an existing
    86    `SugaredLogger` with the provided options applied.
    87  * [#1080][]: Add `*ln` variants to `SugaredLogger` for each log level.
    88    These functions provide a string joining behavior similar to `fmt.Println`.
    89  * [#1088][]: Add `zap.WithFatalHook` option to control the behavior of the
    90    logger for `Fatal`-level log entries. This defaults to exiting the program.
    91  * [#1108][]: Add a `zap.Must` function that you can use with `NewProduction` or
    92    `NewDevelopment` to panic if the system was unable to build the logger.
    93  * [#1118][]: Add a `Logger.Log` method that allows specifying the log level for
    94    a statement dynamically.
    95  
    96  Thanks to @cardil, @craigpastro, @sashamelentyev, @shota3506, and @zhupeijun
    97  for their contributions to this release.
    98  
    99  [#1071]: https://github.com/uber-go/zap/pull/1071
   100  [#1079]: https://github.com/uber-go/zap/pull/1079
   101  [#1080]: https://github.com/uber-go/zap/pull/1080
   102  [#1088]: https://github.com/uber-go/zap/pull/1088
   103  [#1108]: https://github.com/uber-go/zap/pull/1108
   104  [#1118]: https://github.com/uber-go/zap/pull/1118
   105  
   106  ## 1.21.0 (7 Feb 2022)
   107  
   108  Enhancements:
   109  *  [#1047][]: Add `zapcore.ParseLevel` to parse a `Level` from a string.
   110  *  [#1048][]: Add `zap.ParseAtomicLevel` to parse an `AtomicLevel` from a
   111     string.
   112  
   113  Bugfixes:
   114  * [#1058][]: Fix panic in JSON encoder when `EncodeLevel` is unset.
   115  
   116  Other changes:
   117  * [#1052][]: Improve encoding performance when the `AddCaller` and
   118    `AddStacktrace` options are used together.
   119  
   120  [#1047]: https://github.com/uber-go/zap/pull/1047
   121  [#1048]: https://github.com/uber-go/zap/pull/1048
   122  [#1052]: https://github.com/uber-go/zap/pull/1052
   123  [#1058]: https://github.com/uber-go/zap/pull/1058
   124  
   125  Thanks to @aerosol and @Techassi for their contributions to this release.
   126  
   127  ## 1.20.0 (4 Jan 2022)
   128  
   129  Enhancements:
   130  * [#989][]: Add `EncoderConfig.SkipLineEnding` flag to disable adding newline
   131    characters between log statements.
   132  * [#1039][]: Add `EncoderConfig.NewReflectedEncoder` field to customize JSON
   133    encoding of reflected log fields.
   134  
   135  Bugfixes:
   136  * [#1011][]: Fix inaccurate precision when encoding complex64 as JSON.
   137  * [#554][], [#1017][]: Close JSON namespaces opened in `MarshalLogObject`
   138    methods when the methods return.
   139  * [#1033][]: Avoid panicking in Sampler core if `thereafter` is zero.
   140  
   141  Other changes:
   142  * [#1028][]: Drop support for Go < 1.15.
   143  
   144  [#554]: https://github.com/uber-go/zap/pull/554
   145  [#989]: https://github.com/uber-go/zap/pull/989
   146  [#1011]: https://github.com/uber-go/zap/pull/1011
   147  [#1017]: https://github.com/uber-go/zap/pull/1017
   148  [#1028]: https://github.com/uber-go/zap/pull/1028
   149  [#1033]: https://github.com/uber-go/zap/pull/1033
   150  [#1039]: https://github.com/uber-go/zap/pull/1039
   151  
   152  Thanks to @psrajat, @lruggieri, @sammyrnycreal for their contributions to this release.
   153  
   154  ## 1.19.1 (8 Sep 2021)
   155  
   156  Bugfixes:
   157  * [#1001][]: JSON: Fix complex number encoding with negative imaginary part. Thanks to @hemantjadon.
   158  * [#1003][]: JSON: Fix inaccurate precision when encoding float32.
   159  
   160  [#1001]: https://github.com/uber-go/zap/pull/1001
   161  [#1003]: https://github.com/uber-go/zap/pull/1003
   162  
   163  ## 1.19.0 (9 Aug 2021)
   164  
   165  Enhancements:
   166  * [#975][]: Avoid panicking in Sampler core if the level is out of bounds.
   167  * [#984][]: Reduce the size of BufferedWriteSyncer by aligning the fields
   168    better.
   169  
   170  [#975]: https://github.com/uber-go/zap/pull/975
   171  [#984]: https://github.com/uber-go/zap/pull/984
   172  
   173  Thanks to @lancoLiu and @thockin for their contributions to this release.
   174  
   175  ## 1.18.1 (28 Jun 2021)
   176  
   177  Bugfixes:
   178  * [#974][]: Fix nil dereference in logger constructed by `zap.NewNop`.
   179  
   180  [#974]: https://github.com/uber-go/zap/pull/974
   181  
   182  ## 1.18.0 (28 Jun 2021)
   183  
   184  Enhancements:
   185  * [#961][]: Add `zapcore.BufferedWriteSyncer`, a new `WriteSyncer` that buffers
   186    messages in-memory and flushes them periodically.
   187  * [#971][]: Add `zapio.Writer` to use a Zap logger as an `io.Writer`.
   188  * [#897][]: Add `zap.WithClock` option to control the source of time via the
   189    new `zapcore.Clock` interface.
   190  * [#949][]: Avoid panicking in `zap.SugaredLogger` when arguments of `*w`
   191    methods don't match expectations.
   192  * [#943][]: Add support for filtering by level or arbitrary matcher function to
   193    `zaptest/observer`.
   194  * [#691][]: Comply with `io.StringWriter` and `io.ByteWriter` in Zap's
   195    `buffer.Buffer`.
   196  
   197  Thanks to @atrn0, @ernado, @heyanfu, @hnlq715, @zchee
   198  for their contributions to this release.
   199  
   200  [#691]: https://github.com/uber-go/zap/pull/691
   201  [#897]: https://github.com/uber-go/zap/pull/897
   202  [#943]: https://github.com/uber-go/zap/pull/943
   203  [#949]: https://github.com/uber-go/zap/pull/949
   204  [#961]: https://github.com/uber-go/zap/pull/961
   205  [#971]: https://github.com/uber-go/zap/pull/971
   206  
   207  ## 1.17.0 (25 May 2021)
   208  
   209  Bugfixes:
   210  * [#867][]: Encode `<nil>` for nil `error` instead of a panic.
   211  * [#931][], [#936][]: Update minimum version constraints to address
   212    vulnerabilities in dependencies.
   213  
   214  Enhancements:
   215  * [#865][]: Improve alignment of fields of the Logger struct, reducing its
   216    size from 96 to 80 bytes.
   217  * [#881][]: Support `grpclog.LoggerV2` in zapgrpc.
   218  * [#903][]: Support URL-encoded POST requests to the AtomicLevel HTTP handler
   219    with the `application/x-www-form-urlencoded` content type.
   220  * [#912][]: Support multi-field encoding with `zap.Inline`.
   221  * [#913][]: Speed up SugaredLogger for calls with a single string.
   222  * [#928][]: Add support for filtering by field name to `zaptest/observer`.
   223  
   224  Thanks to @ash2k, @FMLS, @jimmystewpot, @Oncilla, @tsoslow, @tylitianrui, @withshubh, and @wziww for their contributions to this release.
   225  
   226  [#865]: https://github.com/uber-go/zap/pull/865
   227  [#867]: https://github.com/uber-go/zap/pull/867
   228  [#881]: https://github.com/uber-go/zap/pull/881
   229  [#903]: https://github.com/uber-go/zap/pull/903
   230  [#912]: https://github.com/uber-go/zap/pull/912
   231  [#913]: https://github.com/uber-go/zap/pull/913
   232  [#928]: https://github.com/uber-go/zap/pull/928
   233  [#931]: https://github.com/uber-go/zap/pull/931
   234  [#936]: https://github.com/uber-go/zap/pull/936
   235  
   236  ## 1.16.0 (1 Sep 2020)
   237  
   238  Bugfixes:
   239  * [#828][]: Fix missing newline in IncreaseLevel error messages.
   240  * [#835][]: Fix panic in JSON encoder when encoding times or durations
   241    without specifying a time or duration encoder.
   242  * [#843][]: Honor CallerSkip when taking stack traces.
   243  * [#862][]: Fix the default file permissions to use `0666` and rely on the umask instead.
   244  * [#854][]: Encode `<nil>` for nil `Stringer` instead of a panic error log.
   245  
   246  Enhancements:
   247  * [#629][]: Added `zapcore.TimeEncoderOfLayout` to easily create time encoders
   248    for custom layouts.
   249  * [#697][]: Added support for a configurable delimiter in the console encoder.
   250  * [#852][]: Optimize console encoder by pooling the underlying JSON encoder.
   251  * [#844][]: Add ability to include the calling function as part of logs.
   252  * [#843][]: Add `StackSkip` for including truncated stacks as a field.
   253  * [#861][]: Add options to customize Fatal behaviour for better testability.
   254  
   255  Thanks to @SteelPhase, @tmshn, @lixingwang, @wyxloading, @moul, @segevfiner, @andy-retailnext and @jcorbin for their contributions to this release.
   256  
   257  [#629]: https://github.com/uber-go/zap/pull/629
   258  [#697]: https://github.com/uber-go/zap/pull/697
   259  [#828]: https://github.com/uber-go/zap/pull/828
   260  [#835]: https://github.com/uber-go/zap/pull/835
   261  [#843]: https://github.com/uber-go/zap/pull/843
   262  [#844]: https://github.com/uber-go/zap/pull/844
   263  [#852]: https://github.com/uber-go/zap/pull/852
   264  [#854]: https://github.com/uber-go/zap/pull/854
   265  [#861]: https://github.com/uber-go/zap/pull/861
   266  [#862]: https://github.com/uber-go/zap/pull/862
   267  
   268  ## 1.15.0 (23 Apr 2020)
   269  
   270  Bugfixes:
   271  * [#804][]: Fix handling of `Time` values out of `UnixNano` range.
   272  * [#812][]: Fix `IncreaseLevel` being reset after a call to `With`.
   273  
   274  Enhancements:
   275  * [#806][]: Add `WithCaller` option to supersede the `AddCaller` option. This
   276    allows disabling annotation of log entries with caller information if
   277    previously enabled with `AddCaller`.
   278  * [#813][]: Deprecate `NewSampler` constructor in favor of
   279    `NewSamplerWithOptions` which supports a `SamplerHook` option. This option
   280     adds support for monitoring sampling decisions through a hook.
   281  
   282  Thanks to @danielbprice for their contributions to this release.
   283  
   284  [#804]: https://github.com/uber-go/zap/pull/804
   285  [#812]: https://github.com/uber-go/zap/pull/812
   286  [#806]: https://github.com/uber-go/zap/pull/806
   287  [#813]: https://github.com/uber-go/zap/pull/813
   288  
   289  ## 1.14.1 (14 Mar 2020)
   290  
   291  Bugfixes:
   292  * [#791][]: Fix panic on attempting to build a logger with an invalid Config.
   293  * [#795][]: Vendoring Zap with `go mod vendor` no longer includes Zap's
   294    development-time dependencies.
   295  * [#799][]: Fix issue introduced in 1.14.0 that caused invalid JSON output to
   296    be generated for arrays of `time.Time` objects when using string-based time
   297    formats.
   298  
   299  Thanks to @YashishDua for their contributions to this release.
   300  
   301  [#791]: https://github.com/uber-go/zap/pull/791
   302  [#795]: https://github.com/uber-go/zap/pull/795
   303  [#799]: https://github.com/uber-go/zap/pull/799
   304  
   305  ## 1.14.0 (20 Feb 2020)
   306  
   307  Enhancements:
   308  * [#771][]: Optimize calls for disabled log levels.
   309  * [#773][]: Add millisecond duration encoder.
   310  * [#775][]: Add option to increase the level of a logger.
   311  * [#786][]: Optimize time formatters using `Time.AppendFormat` where possible.
   312  
   313  Thanks to @caibirdme for their contributions to this release.
   314  
   315  [#771]: https://github.com/uber-go/zap/pull/771
   316  [#773]: https://github.com/uber-go/zap/pull/773
   317  [#775]: https://github.com/uber-go/zap/pull/775
   318  [#786]: https://github.com/uber-go/zap/pull/786
   319  
   320  ## 1.13.0 (13 Nov 2019)
   321  
   322  Enhancements:
   323  * [#758][]: Add `Intp`, `Stringp`, and other similar `*p` field constructors
   324    to log pointers to primitives with support for `nil` values.
   325  
   326  Thanks to @jbizzle for their contributions to this release.
   327  
   328  [#758]: https://github.com/uber-go/zap/pull/758
   329  
   330  ## 1.12.0 (29 Oct 2019)
   331  
   332  Enhancements:
   333  * [#751][]: Migrate to Go modules.
   334  
   335  [#751]: https://github.com/uber-go/zap/pull/751
   336  
   337  ## 1.11.0 (21 Oct 2019)
   338  
   339  Enhancements:
   340  * [#725][]: Add `zapcore.OmitKey` to omit keys in an `EncoderConfig`.
   341  * [#736][]: Add `RFC3339` and `RFC3339Nano` time encoders.
   342  
   343  Thanks to @juicemia, @uhthomas for their contributions to this release.
   344  
   345  [#725]: https://github.com/uber-go/zap/pull/725
   346  [#736]: https://github.com/uber-go/zap/pull/736
   347  
   348  ## 1.10.0 (29 Apr 2019)
   349  
   350  Bugfixes:
   351  * [#657][]: Fix `MapObjectEncoder.AppendByteString` not adding value as a
   352    string.
   353  * [#706][]: Fix incorrect call depth to determine caller in Go 1.12.
   354  
   355  Enhancements:
   356  * [#610][]: Add `zaptest.WrapOptions` to wrap `zap.Option` for creating test
   357    loggers.
   358  * [#675][]: Don't panic when encoding a String field.
   359  * [#704][]: Disable HTML escaping for JSON objects encoded using the
   360    reflect-based encoder.
   361  
   362  Thanks to @iaroslav-ciupin, @lelenanam, @joa, @NWilson for their contributions
   363  to this release.
   364  
   365  [#657]: https://github.com/uber-go/zap/pull/657
   366  [#706]: https://github.com/uber-go/zap/pull/706
   367  [#610]: https://github.com/uber-go/zap/pull/610
   368  [#675]: https://github.com/uber-go/zap/pull/675
   369  [#704]: https://github.com/uber-go/zap/pull/704
   370  
   371  ## 1.9.1 (06 Aug 2018)
   372  
   373  Bugfixes:
   374  
   375  * [#614][]: MapObjectEncoder should not ignore empty slices.
   376  
   377  [#614]: https://github.com/uber-go/zap/pull/614
   378  
   379  ## 1.9.0 (19 Jul 2018)
   380  
   381  Enhancements:
   382  * [#602][]: Reduce number of allocations when logging with reflection.
   383  * [#572][], [#606][]: Expose a registry for third-party logging sinks.
   384  
   385  Thanks to @nfarah86, @AlekSi, @JeanMertz, @philippgille, @etsangsplk, and
   386  @dimroc for their contributions to this release.
   387  
   388  [#602]: https://github.com/uber-go/zap/pull/602
   389  [#572]: https://github.com/uber-go/zap/pull/572
   390  [#606]: https://github.com/uber-go/zap/pull/606
   391  
   392  ## 1.8.0 (13 Apr 2018)
   393  
   394  Enhancements:
   395  * [#508][]: Make log level configurable when redirecting the standard
   396    library's logger.
   397  * [#518][]: Add a logger that writes to a `*testing.TB`.
   398  * [#577][]: Add a top-level alias for `zapcore.Field` to clean up GoDoc.
   399  
   400  Bugfixes:
   401  * [#574][]: Add a missing import comment to `github.com/Laisky/zap/buffer`.
   402  
   403  Thanks to @DiSiqueira and @djui for their contributions to this release.
   404  
   405  [#508]: https://github.com/uber-go/zap/pull/508
   406  [#518]: https://github.com/uber-go/zap/pull/518
   407  [#577]: https://github.com/uber-go/zap/pull/577
   408  [#574]: https://github.com/uber-go/zap/pull/574
   409  
   410  ## 1.7.1 (25 Sep 2017)
   411  
   412  Bugfixes:
   413  * [#504][]: Store strings when using AddByteString with the map encoder.
   414  
   415  [#504]: https://github.com/uber-go/zap/pull/504
   416  
   417  ## 1.7.0 (21 Sep 2017)
   418  
   419  Enhancements:
   420  
   421  * [#487][]: Add `NewStdLogAt`, which extends `NewStdLog` by allowing the user
   422    to specify the level of the logged messages.
   423  
   424  [#487]: https://github.com/uber-go/zap/pull/487
   425  
   426  ## 1.6.0 (30 Aug 2017)
   427  
   428  Enhancements:
   429  
   430  * [#491][]: Omit zap stack frames from stacktraces.
   431  * [#490][]: Add a `ContextMap` method to observer logs for simpler
   432    field validation in tests.
   433  
   434  [#490]: https://github.com/uber-go/zap/pull/490
   435  [#491]: https://github.com/uber-go/zap/pull/491
   436  
   437  ## 1.5.0 (22 Jul 2017)
   438  
   439  Enhancements:
   440  
   441  * [#460][] and [#470][]: Support errors produced by `go.uber.org/multierr`.
   442  * [#465][]: Support user-supplied encoders for logger names.
   443  
   444  Bugfixes:
   445  
   446  * [#477][]: Fix a bug that incorrectly truncated deep stacktraces.
   447  
   448  Thanks to @richard-tunein and @pavius for their contributions to this release.
   449  
   450  [#477]: https://github.com/uber-go/zap/pull/477
   451  [#465]: https://github.com/uber-go/zap/pull/465
   452  [#460]: https://github.com/uber-go/zap/pull/460
   453  [#470]: https://github.com/uber-go/zap/pull/470
   454  
   455  ## 1.4.1 (08 Jun 2017)
   456  
   457  This release fixes two bugs.
   458  
   459  Bugfixes:
   460  
   461  * [#435][]: Support a variety of case conventions when unmarshaling levels.
   462  * [#444][]: Fix a panic in the observer.
   463  
   464  [#435]: https://github.com/uber-go/zap/pull/435
   465  [#444]: https://github.com/uber-go/zap/pull/444
   466  
   467  ## 1.4.0 (12 May 2017)
   468  
   469  This release adds a few small features and is fully backward-compatible.
   470  
   471  Enhancements:
   472  
   473  * [#424][]: Add a `LineEnding` field to `EncoderConfig`, allowing users to
   474    override the Unix-style default.
   475  * [#425][]: Preserve time zones when logging times.
   476  * [#431][]: Make `zap.AtomicLevel` implement `fmt.Stringer`, which makes a
   477    variety of operations a bit simpler.
   478  
   479  [#424]: https://github.com/uber-go/zap/pull/424
   480  [#425]: https://github.com/uber-go/zap/pull/425
   481  [#431]: https://github.com/uber-go/zap/pull/431
   482  
   483  ## 1.3.0 (25 Apr 2017)
   484  
   485  This release adds an enhancement to zap's testing helpers as well as the
   486  ability to marshal an AtomicLevel. It is fully backward-compatible.
   487  
   488  Enhancements:
   489  
   490  * [#415][]: Add a substring-filtering helper to zap's observer. This is
   491    particularly useful when testing the `SugaredLogger`.
   492  * [#416][]: Make `AtomicLevel` implement `encoding.TextMarshaler`.
   493  
   494  [#415]: https://github.com/uber-go/zap/pull/415
   495  [#416]: https://github.com/uber-go/zap/pull/416
   496  
   497  ## 1.2.0 (13 Apr 2017)
   498  
   499  This release adds a gRPC compatibility wrapper. It is fully backward-compatible.
   500  
   501  Enhancements:
   502  
   503  * [#402][]: Add a `zapgrpc` package that wraps zap's Logger and implements
   504    `grpclog.Logger`.
   505  
   506  [#402]: https://github.com/uber-go/zap/pull/402
   507  
   508  ## 1.1.0 (31 Mar 2017)
   509  
   510  This release fixes two bugs and adds some enhancements to zap's testing helpers.
   511  It is fully backward-compatible.
   512  
   513  Bugfixes:
   514  
   515  * [#385][]: Fix caller path trimming on Windows.
   516  * [#396][]: Fix a panic when attempting to use non-existent directories with
   517    zap's configuration struct.
   518  
   519  Enhancements:
   520  
   521  * [#386][]: Add filtering helpers to zaptest's observing logger.
   522  
   523  Thanks to @moitias for contributing to this release.
   524  
   525  [#385]: https://github.com/uber-go/zap/pull/385
   526  [#396]: https://github.com/uber-go/zap/pull/396
   527  [#386]: https://github.com/uber-go/zap/pull/386
   528  
   529  ## 1.0.0 (14 Mar 2017)
   530  
   531  This is zap's first stable release. All exported APIs are now final, and no
   532  further breaking changes will be made in the 1.x release series. Anyone using a
   533  semver-aware dependency manager should now pin to `^1`.
   534  
   535  Breaking changes:
   536  
   537  * [#366][]: Add byte-oriented APIs to encoders to log UTF-8 encoded text without
   538    casting from `[]byte` to `string`.
   539  * [#364][]: To support buffering outputs, add `Sync` methods to `zapcore.Core`,
   540    `zap.Logger`, and `zap.SugaredLogger`.
   541  * [#371][]: Rename the `testutils` package to `zaptest`, which is less likely to
   542    clash with other testing helpers.
   543  
   544  Bugfixes:
   545  
   546  * [#362][]: Make the ISO8601 time formatters fixed-width, which is friendlier
   547    for tab-separated console output.
   548  * [#369][]: Remove the automatic locks in `zapcore.NewCore`, which allows zap to
   549    work with concurrency-safe `WriteSyncer` implementations.
   550  * [#347][]: Stop reporting errors when trying to `fsync` standard out on Linux
   551    systems.
   552  * [#373][]: Report the correct caller from zap's standard library
   553    interoperability wrappers.
   554  
   555  Enhancements:
   556  
   557  * [#348][]: Add a registry allowing third-party encodings to work with zap's
   558    built-in `Config`.
   559  * [#327][]: Make the representation of logger callers configurable (like times,
   560    levels, and durations).
   561  * [#376][]: Allow third-party encoders to use their own buffer pools, which
   562    removes the last performance advantage that zap's encoders have over plugins.
   563  * [#346][]: Add `CombineWriteSyncers`, a convenience function to tee multiple
   564    `WriteSyncer`s and lock the result.
   565  * [#365][]: Make zap's stacktraces compatible with mid-stack inlining (coming in
   566    Go 1.9).
   567  * [#372][]: Export zap's observing logger as `zaptest/observer`. This makes it
   568    easier for particularly punctilious users to unit test their application's
   569    logging.
   570  
   571  Thanks to @suyash, @htrendev, @flisky, @Ulexus, and @skipor for their
   572  contributions to this release.
   573  
   574  [#366]: https://github.com/uber-go/zap/pull/366
   575  [#364]: https://github.com/uber-go/zap/pull/364
   576  [#371]: https://github.com/uber-go/zap/pull/371
   577  [#362]: https://github.com/uber-go/zap/pull/362
   578  [#369]: https://github.com/uber-go/zap/pull/369
   579  [#347]: https://github.com/uber-go/zap/pull/347
   580  [#373]: https://github.com/uber-go/zap/pull/373
   581  [#348]: https://github.com/uber-go/zap/pull/348
   582  [#327]: https://github.com/uber-go/zap/pull/327
   583  [#376]: https://github.com/uber-go/zap/pull/376
   584  [#346]: https://github.com/uber-go/zap/pull/346
   585  [#365]: https://github.com/uber-go/zap/pull/365
   586  [#372]: https://github.com/uber-go/zap/pull/372
   587  
   588  ## 1.0.0-rc.3 (7 Mar 2017)
   589  
   590  This is the third release candidate for zap's stable release. There are no
   591  breaking changes.
   592  
   593  Bugfixes:
   594  
   595  * [#339][]: Byte slices passed to `zap.Any` are now correctly treated as binary blobs
   596    rather than `[]uint8`.
   597  
   598  Enhancements:
   599  
   600  * [#307][]: Users can opt into colored output for log levels.
   601  * [#353][]: In addition to hijacking the output of the standard library's
   602    package-global logging functions, users can now construct a zap-backed
   603    `log.Logger` instance.
   604  * [#311][]: Frames from common runtime functions and some of zap's internal
   605    machinery are now omitted from stacktraces.
   606  
   607  Thanks to @ansel1 and @suyash for their contributions to this release.
   608  
   609  [#339]: https://github.com/uber-go/zap/pull/339
   610  [#307]: https://github.com/uber-go/zap/pull/307
   611  [#353]: https://github.com/uber-go/zap/pull/353
   612  [#311]: https://github.com/uber-go/zap/pull/311
   613  
   614  ## 1.0.0-rc.2 (21 Feb 2017)
   615  
   616  This is the second release candidate for zap's stable release. It includes two
   617  breaking changes.
   618  
   619  Breaking changes:
   620  
   621  * [#316][]: Zap's global loggers are now fully concurrency-safe
   622    (previously, users had to ensure that `ReplaceGlobals` was called before the
   623    loggers were in use). However, they must now be accessed via the `L()` and
   624    `S()` functions. Users can update their projects with
   625  
   626    ```
   627    gofmt -r "zap.L -> zap.L()" -w .
   628    gofmt -r "zap.S -> zap.S()" -w .
   629    ```
   630  * [#309][] and [#317][]: RC1 was mistakenly shipped with invalid
   631    JSON and YAML struct tags on all config structs. This release fixes the tags
   632    and adds static analysis to prevent similar bugs in the future.
   633  
   634  Bugfixes:
   635  
   636  * [#321][]: Redirecting the standard library's `log` output now
   637    correctly reports the logger's caller.
   638  
   639  Enhancements:
   640  
   641  * [#325][] and [#333][]: Zap now transparently supports non-standard, rich
   642    errors like those produced by `github.com/pkg/errors`.
   643  * [#326][]: Though `New(nil)` continues to return a no-op logger, `NewNop()` is
   644    now preferred. Users can update their projects with `gofmt -r 'zap.New(nil) ->
   645    zap.NewNop()' -w .`.
   646  * [#300][]: Incorrectly importing zap as `github.com/uber-go/zap` now returns a
   647    more informative error.
   648  
   649  Thanks to @skipor and @chapsuk for their contributions to this release.
   650  
   651  [#316]: https://github.com/uber-go/zap/pull/316
   652  [#309]: https://github.com/uber-go/zap/pull/309
   653  [#317]: https://github.com/uber-go/zap/pull/317
   654  [#321]: https://github.com/uber-go/zap/pull/321
   655  [#325]: https://github.com/uber-go/zap/pull/325
   656  [#333]: https://github.com/uber-go/zap/pull/333
   657  [#326]: https://github.com/uber-go/zap/pull/326
   658  [#300]: https://github.com/uber-go/zap/pull/300
   659  
   660  ## 1.0.0-rc.1 (14 Feb 2017)
   661  
   662  This is the first release candidate for zap's stable release. There are multiple
   663  breaking changes and improvements from the pre-release version. Most notably:
   664  
   665  * **Zap's import path is now "github.com/Laisky/zap"** &mdash; all users will
   666    need to update their code.
   667  * User-facing types and functions remain in the `zap` package. Code relevant
   668    largely to extension authors is now in the `zapcore` package.
   669  * The `zapcore.Core` type makes it easy for third-party packages to use zap's
   670    internals but provide a different user-facing API.
   671  * `Logger` is now a concrete type instead of an interface.
   672  * A less verbose (though slower) logging API is included by default.
   673  * Package-global loggers `L` and `S` are included.
   674  * A human-friendly console encoder is included.
   675  * A declarative config struct allows common logger configurations to be managed
   676    as configuration instead of code.
   677  * Sampling is more accurate, and doesn't depend on the standard library's shared
   678    timer heap.
   679  
   680  ## 0.1.0-beta.1 (6 Feb 2017)
   681  
   682  This is a minor version, tagged to allow users to pin to the pre-1.0 APIs and
   683  upgrade at their leisure. Since this is the first tagged release, there are no
   684  backward compatibility concerns and all functionality is new.
   685  
   686  Early zap adopters should pin to the 0.1.x minor version until they're ready to
   687  upgrade to the upcoming stable release.