Releases: uber-go/zap
Releases · uber-go/zap
v1.19.0
v1.18.1
v1.18.0
Enhancements:
- #961: Add
zapcore.BufferedWriteSyncer
, a newWriteSyncer
that buffers
messages in-memory and flushes them periodically. - #971: Add
zapio.Writer
to use a Zap logger as anio.Writer
. - #897: Add
zap.WithClock
option to control the source of time via the
newzapcore.Clock
interface. - #949: Avoid panicking in
zap.SugaredLogger
when arguments of*w
methods don't match expectations. - #943: Add support for filtering by level or arbitrary matcher function to
zaptest/observer
. - #691: Comply with
io.StringWriter
andio.ByteWriter
in Zap's
buffer.Buffer
.
Thanks to @atrn0, @ernado, @heyanfu, @hnlq715, @zchee
for their contributions to this release.
v1.17.0
Bugfixes:
- #867: Encode
<nil>
for nilerror
instead of a panic. - #931, #936: Update minimum version constraints to address
vulnerabilities in dependencies.
Enhancements:
- #865: Improve alignment of fields of the Logger struct, reducing its
size from 96 to 80 bytes. - #881: Support
grpclog.LoggerV2
in zapgrpc. - #903: Support URL-encoded POST requests to the AtomicLevel HTTP handler
with theapplication/x-www-form-urlencoded
content type. - #912: Support multi-field encoding with
zap.Inline
. - #913: Speed up SugaredLogger for calls with a single string.
- #928: Add support for filtering by field name to
zaptest/observer
.
Thanks to @ash2k, @FMLS, @jimmystewpot, @oncilla, @tsoslow, @tylitianrui, @withshubh, and @wziww for their contributions to this release.
v1.16.0
Bugfixes:
- #828: Fix missing newline in IncreaseLevel error messages.
- #835: Fix panic in JSON encoder when encoding times or durations
without specifying a time or duration encoder. - #843: Honor CallerSkip when taking stack traces.
- #862: Fix the default file permissions to use
0666
and rely on the umask instead. - #854: Encode
<nil>
for nilStringer
instead of a panic error log.
Enhancements:
- #629: Added
zapcore.TimeEncoderOfLayout
to easily create time encoders
for custom layouts. - #697: Added support for a configurable delimiter in the console encoder.
- #852: Optimize console encoder by pooling the underlying JSON encoder.
- #844: Add ability to include the calling function as part of logs.
- #843: Add
StackSkip
for including truncated stacks as a field. - #861: Add options to customize Fatal behaviour for better testability.
Thanks to @SteelPhase, @tmshn, @lixingwang, @wyxloading, @moul, @segevfiner, @andy-retailnext and @jcorbin for their contributions to this release.
v1.15.0
Bugfixes:
- #804: Fix handling of
Time
values out ofUnixNano
range. - #812: Fix
IncreaseLevel
being reset after a call toWith
.
Enhancements:
- #806: Add
WithCaller
option to supersede theAddCaller
option. This
allows disabling annotation of log entries with caller information if
previously enabled withAddCaller
. - #813: Deprecate
NewSampler
constructor in favor of
NewSamplerWithOptions
which supports aSamplerHook
option. This option
adds support for monitoring sampling decisions through a hook.
Thanks to @danielbprice for their contributions to this release.
v1.14.1
Bugfixes:
- #791: Fix panic on attempting to build a logger with an invalid Config.
- #795: Vendoring Zap with
go mod vendor
no longer includes Zap's
development-time dependencies. - #799: Fix issue introduced in 1.14.0 that caused invalid JSON output to
be generated for arrays oftime.Time
objects when using string-based time
formats.
Thanks to @YashishDua for their contributions to this release.