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