Changelog History
Page 1
-
v1.23.0 Changes
August 24, 2022 -
v1.22.0 Changes
August 08, 2022✨ Enhancements:
- 🌲 #1071: Add
zap.Objects
andzap.ObjectValues
field constructors to log arrays of objects. With these two constructors, you don't need to implementzapcore.ArrayMarshaler
for use withzap.Array
if those objects implementzapcore.ObjectMarshaler
. - 🏗 #1079: Add
SugaredLogger.WithOptions
to build a copy of an existingSugaredLogger
with the provided options applied. - 🌲 #1080: Add
*ln
variants toSugaredLogger
for each log level. These functions provide a string joining behavior similar tofmt.Println
. - #1088: Add
zap.WithFatalHook
option to control the behavior of the logger forFatal
-level log entries. This defaults to exiting the program. - #1108: Add a
zap.Must
function that you can use withNewProduction
orNewDevelopment
to panic if the system was unable to build the logger. - 🌲 #1118: Add a
Logger.Log
method that allows specifying the log level for a statement dynamically.
Thanks to @cardil, @craigpastro, @sashamelentyev, @shota3506, and @zhupeijun 🚀 for their contributions to this release.
- 🌲 #1071: Add
-
v1.21.0 Changes
February 07, 2022✨ Enhancements:
- 📜 #1047: Add
zapcore.ParseLevel
to parse aLevel
from a string. - 📜 #1048: Add
zap.ParseAtomicLevel
to parse anAtomicLevel
from a string.
🛠 Bugfixes:
- #1058: Fix panic in JSON encoder when
EncodeLevel
is unset.
Other changes:
- 🐎 #1052: Improve encoding performance when the
AddCaller
andAddStacktrace
options are used together.
🚀 Thanks to @aerosol and @Techassi for their contributions to this release.
- 📜 #1047: Add
-
v1.20.0 Changes
January 04, 2022✨ Enhancements:
- #989: Add
EncoderConfig.SkipLineEnding
flag to disable adding newline characters between log statements. - #1039: Add
EncoderConfig.NewReflectedEncoder
field to customize JSON encoding of reflected log fields.
🛠 Bugfixes:
- #1011: Fix inaccurate precision when encoding complex64 as JSON.
- #554, #1017: Close JSON namespaces opened in
MarshalLogObject
methods when the methods return. - #1033: Avoid panicking in Sampler core if
thereafter
is zero.
Other changes:
- 👍 #1028: Drop support for Go < 1.15.
🚀 Thanks to @psrajat, @lruggieri, @sammyrnycreal for their contributions to this release.
- #989: Add
-
v1.19.1 Changes
September 08, 2021 -
v1.19.0 Changes
August 09, 2021 -
v1.18.1 Changes
June 28, 2021🛠 Bugfixes:
- #974: Fix nil dereference in logger constructed by
zap.NewNop
.
- #974: Fix nil dereference in logger constructed by
-
v1.18.0 Changes
June 28, 2021✨ 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'sbuffer.Buffer
.
Thanks to @atrn0, @ernado, @heyanfu, @hnlq715, @zchee 🚀 for their contributions to this release.
- #961: Add
-
v1.17.0 Changes
May 25, 2021🛠 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 the
application/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.
- [#867][]: Encode
-
v1.16.0 Changes
September 01, 2020🛠 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.
- 0️⃣ #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.