1# Changelog
2
3## 1.10.0 (29 Apr 2019)
4
5Bugfixes:
6* [#657][]: Fix `MapObjectEncoder.AppendByteString` not adding value as a
7  string.
8* [#706][]: Fix incorrect call depth to determine caller in Go 1.12.
9
10Enhancements:
11* [#610][]: Add `zaptest.WrapOptions` to wrap `zap.Option` for creating test
12  loggers.
13* [#675][]: Don't panic when encoding a String field.
14* [#704][]: Disable HTML escaping for JSON objects encoded using the
15  reflect-based encoder.
16
17Thanks to @iaroslav-ciupin, @lelenanam, @joa, @NWilson for their contributions
18to this release.
19
20## v1.9.1 (06 Aug 2018)
21
22Bugfixes:
23
24* [#614][]: MapObjectEncoder should not ignore empty slices.
25
26## v1.9.0 (19 Jul 2018)
27
28Enhancements:
29* [#602][]: Reduce number of allocations when logging with reflection.
30* [#572][], [#606][]: Expose a registry for third-party logging sinks.
31
32Thanks to @nfarah86, @AlekSi, @JeanMertz, @philippgille, @etsangsplk, and
33@dimroc for their contributions to this release.
34
35## v1.8.0 (13 Apr 2018)
36
37Enhancements:
38* [#508][]: Make log level configurable when redirecting the standard
39  library's logger.
40* [#518][]: Add a logger that writes to a `*testing.TB`.
41* [#577][]: Add a top-level alias for `zapcore.Field` to clean up GoDoc.
42
43Bugfixes:
44* [#574][]: Add a missing import comment to `go.uber.org/zap/buffer`.
45
46Thanks to @DiSiqueira and @djui for their contributions to this release.
47
48## v1.7.1 (25 Sep 2017)
49
50Bugfixes:
51* [#504][]: Store strings when using AddByteString with the map encoder.
52
53## v1.7.0 (21 Sep 2017)
54
55Enhancements:
56
57* [#487][]: Add `NewStdLogAt`, which extends `NewStdLog` by allowing the user
58  to specify the level of the logged messages.
59
60## v1.6.0 (30 Aug 2017)
61
62Enhancements:
63
64* [#491][]: Omit zap stack frames from stacktraces.
65* [#490][]: Add a `ContextMap` method to observer logs for simpler
66  field validation in tests.
67
68## v1.5.0 (22 Jul 2017)
69
70Enhancements:
71
72* [#460][] and [#470][]: Support errors produced by `go.uber.org/multierr`.
73* [#465][]: Support user-supplied encoders for logger names.
74
75Bugfixes:
76
77* [#477][]: Fix a bug that incorrectly truncated deep stacktraces.
78
79Thanks to @richard-tunein and @pavius for their contributions to this release.
80
81## v1.4.1 (08 Jun 2017)
82
83This release fixes two bugs.
84
85Bugfixes:
86
87* [#435][]: Support a variety of case conventions when unmarshaling levels.
88* [#444][]: Fix a panic in the observer.
89
90## v1.4.0 (12 May 2017)
91
92This release adds a few small features and is fully backward-compatible.
93
94Enhancements:
95
96* [#424][]: Add a `LineEnding` field to `EncoderConfig`, allowing users to
97  override the Unix-style default.
98* [#425][]: Preserve time zones when logging times.
99* [#431][]: Make `zap.AtomicLevel` implement `fmt.Stringer`, which makes a
100  variety of operations a bit simpler.
101
102## v1.3.0 (25 Apr 2017)
103
104This release adds an enhancement to zap's testing helpers as well as the
105ability to marshal an AtomicLevel. It is fully backward-compatible.
106
107Enhancements:
108
109* [#415][]: Add a substring-filtering helper to zap's observer. This is
110  particularly useful when testing the `SugaredLogger`.
111* [#416][]: Make `AtomicLevel` implement `encoding.TextMarshaler`.
112
113## v1.2.0 (13 Apr 2017)
114
115This release adds a gRPC compatibility wrapper. It is fully backward-compatible.
116
117Enhancements:
118
119* [#402][]: Add a `zapgrpc` package that wraps zap's Logger and implements
120  `grpclog.Logger`.
121
122## v1.1.0 (31 Mar 2017)
123
124This release fixes two bugs and adds some enhancements to zap's testing helpers.
125It is fully backward-compatible.
126
127Bugfixes:
128
129* [#385][]: Fix caller path trimming on Windows.
130* [#396][]: Fix a panic when attempting to use non-existent directories with
131  zap's configuration struct.
132
133Enhancements:
134
135* [#386][]: Add filtering helpers to zaptest's observing logger.
136
137Thanks to @moitias for contributing to this release.
138
139## v1.0.0 (14 Mar 2017)
140
141This is zap's first stable release. All exported APIs are now final, and no
142further breaking changes will be made in the 1.x release series. Anyone using a
143semver-aware dependency manager should now pin to `^1`.
144
145Breaking changes:
146
147* [#366][]: Add byte-oriented APIs to encoders to log UTF-8 encoded text without
148  casting from `[]byte` to `string`.
149* [#364][]: To support buffering outputs, add `Sync` methods to `zapcore.Core`,
150  `zap.Logger`, and `zap.SugaredLogger`.
151* [#371][]: Rename the `testutils` package to `zaptest`, which is less likely to
152  clash with other testing helpers.
153
154Bugfixes:
155
156* [#362][]: Make the ISO8601 time formatters fixed-width, which is friendlier
157  for tab-separated console output.
158* [#369][]: Remove the automatic locks in `zapcore.NewCore`, which allows zap to
159  work with concurrency-safe `WriteSyncer` implementations.
160* [#347][]: Stop reporting errors when trying to `fsync` standard out on Linux
161  systems.
162* [#373][]: Report the correct caller from zap's standard library
163  interoperability wrappers.
164
165Enhancements:
166
167* [#348][]: Add a registry allowing third-party encodings to work with zap's
168  built-in `Config`.
169* [#327][]: Make the representation of logger callers configurable (like times,
170  levels, and durations).
171* [#376][]: Allow third-party encoders to use their own buffer pools, which
172  removes the last performance advantage that zap's encoders have over plugins.
173* [#346][]: Add `CombineWriteSyncers`, a convenience function to tee multiple
174  `WriteSyncer`s and lock the result.
175* [#365][]: Make zap's stacktraces compatible with mid-stack inlining (coming in
176  Go 1.9).
177* [#372][]: Export zap's observing logger as `zaptest/observer`. This makes it
178  easier for particularly punctilious users to unit test their application's
179  logging.
180
181Thanks to @suyash, @htrendev, @flisky, @Ulexus, and @skipor for their
182contributions to this release.
183
184## v1.0.0-rc.3 (7 Mar 2017)
185
186This is the third release candidate for zap's stable release. There are no
187breaking changes.
188
189Bugfixes:
190
191* [#339][]: Byte slices passed to `zap.Any` are now correctly treated as binary blobs
192  rather than `[]uint8`.
193
194Enhancements:
195
196* [#307][]: Users can opt into colored output for log levels.
197* [#353][]: In addition to hijacking the output of the standard library's
198  package-global logging functions, users can now construct a zap-backed
199  `log.Logger` instance.
200* [#311][]: Frames from common runtime functions and some of zap's internal
201  machinery are now omitted from stacktraces.
202
203Thanks to @ansel1 and @suyash for their contributions to this release.
204
205## v1.0.0-rc.2 (21 Feb 2017)
206
207This is the second release candidate for zap's stable release. It includes two
208breaking changes.
209
210Breaking changes:
211
212* [#316][]: Zap's global loggers are now fully concurrency-safe
213  (previously, users had to ensure that `ReplaceGlobals` was called before the
214  loggers were in use). However, they must now be accessed via the `L()` and
215  `S()` functions. Users can update their projects with
216
217  ```
218  gofmt -r "zap.L -> zap.L()" -w .
219  gofmt -r "zap.S -> zap.S()" -w .
220  ```
221* [#309][] and [#317][]: RC1 was mistakenly shipped with invalid
222  JSON and YAML struct tags on all config structs. This release fixes the tags
223  and adds static analysis to prevent similar bugs in the future.
224
225Bugfixes:
226
227* [#321][]: Redirecting the standard library's `log` output now
228  correctly reports the logger's caller.
229
230Enhancements:
231
232* [#325][] and [#333][]: Zap now transparently supports non-standard, rich
233  errors like those produced by `github.com/pkg/errors`.
234* [#326][]: Though `New(nil)` continues to return a no-op logger, `NewNop()` is
235  now preferred. Users can update their projects with `gofmt -r 'zap.New(nil) ->
236  zap.NewNop()' -w .`.
237* [#300][]: Incorrectly importing zap as `github.com/uber-go/zap` now returns a
238  more informative error.
239
240Thanks to @skipor and @chapsuk for their contributions to this release.
241
242## v1.0.0-rc.1 (14 Feb 2017)
243
244This is the first release candidate for zap's stable release. There are multiple
245breaking changes and improvements from the pre-release version. Most notably:
246
247* **Zap's import path is now "go.uber.org/zap"** — all users will
248  need to update their code.
249* User-facing types and functions remain in the `zap` package. Code relevant
250  largely to extension authors is now in the `zapcore` package.
251* The `zapcore.Core` type makes it easy for third-party packages to use zap's
252  internals but provide a different user-facing API.
253* `Logger` is now a concrete type instead of an interface.
254* A less verbose (though slower) logging API is included by default.
255* Package-global loggers `L` and `S` are included.
256* A human-friendly console encoder is included.
257* A declarative config struct allows common logger configurations to be managed
258  as configuration instead of code.
259* Sampling is more accurate, and doesn't depend on the standard library's shared
260  timer heap.
261
262## v0.1.0-beta.1 (6 Feb 2017)
263
264This is a minor version, tagged to allow users to pin to the pre-1.0 APIs and
265upgrade at their leisure. Since this is the first tagged release, there are no
266backward compatibility concerns and all functionality is new.
267
268Early zap adopters should pin to the 0.1.x minor version until they're ready to
269upgrade to the upcoming stable release.
270
271[#316]: https://github.com/uber-go/zap/pull/316
272[#309]: https://github.com/uber-go/zap/pull/309
273[#317]: https://github.com/uber-go/zap/pull/317
274[#321]: https://github.com/uber-go/zap/pull/321
275[#325]: https://github.com/uber-go/zap/pull/325
276[#333]: https://github.com/uber-go/zap/pull/333
277[#326]: https://github.com/uber-go/zap/pull/326
278[#300]: https://github.com/uber-go/zap/pull/300
279[#339]: https://github.com/uber-go/zap/pull/339
280[#307]: https://github.com/uber-go/zap/pull/307
281[#353]: https://github.com/uber-go/zap/pull/353
282[#311]: https://github.com/uber-go/zap/pull/311
283[#366]: https://github.com/uber-go/zap/pull/366
284[#364]: https://github.com/uber-go/zap/pull/364
285[#371]: https://github.com/uber-go/zap/pull/371
286[#362]: https://github.com/uber-go/zap/pull/362
287[#369]: https://github.com/uber-go/zap/pull/369
288[#347]: https://github.com/uber-go/zap/pull/347
289[#373]: https://github.com/uber-go/zap/pull/373
290[#348]: https://github.com/uber-go/zap/pull/348
291[#327]: https://github.com/uber-go/zap/pull/327
292[#376]: https://github.com/uber-go/zap/pull/376
293[#346]: https://github.com/uber-go/zap/pull/346
294[#365]: https://github.com/uber-go/zap/pull/365
295[#372]: https://github.com/uber-go/zap/pull/372
296[#385]: https://github.com/uber-go/zap/pull/385
297[#396]: https://github.com/uber-go/zap/pull/396
298[#386]: https://github.com/uber-go/zap/pull/386
299[#402]: https://github.com/uber-go/zap/pull/402
300[#415]: https://github.com/uber-go/zap/pull/415
301[#416]: https://github.com/uber-go/zap/pull/416
302[#424]: https://github.com/uber-go/zap/pull/424
303[#425]: https://github.com/uber-go/zap/pull/425
304[#431]: https://github.com/uber-go/zap/pull/431
305[#435]: https://github.com/uber-go/zap/pull/435
306[#444]: https://github.com/uber-go/zap/pull/444
307[#477]: https://github.com/uber-go/zap/pull/477
308[#465]: https://github.com/uber-go/zap/pull/465
309[#460]: https://github.com/uber-go/zap/pull/460
310[#470]: https://github.com/uber-go/zap/pull/470
311[#487]: https://github.com/uber-go/zap/pull/487
312[#490]: https://github.com/uber-go/zap/pull/490
313[#491]: https://github.com/uber-go/zap/pull/491
314[#504]: https://github.com/uber-go/zap/pull/504
315[#508]: https://github.com/uber-go/zap/pull/508
316[#518]: https://github.com/uber-go/zap/pull/518
317[#577]: https://github.com/uber-go/zap/pull/577
318[#574]: https://github.com/uber-go/zap/pull/574
319[#602]: https://github.com/uber-go/zap/pull/602
320[#572]: https://github.com/uber-go/zap/pull/572
321[#606]: https://github.com/uber-go/zap/pull/606
322[#614]: https://github.com/uber-go/zap/pull/614
323[#657]: https://github.com/uber-go/zap/pull/657
324[#706]: https://github.com/uber-go/zap/pull/706
325[#610]: https://github.com/uber-go/zap/pull/610
326[#675]: https://github.com/uber-go/zap/pull/675
327[#704]: https://github.com/uber-go/zap/pull/704
328