v1.1.0
This release has bugfixes and feature improvements.
- The new
NewLoggerWithOptions()
function can be used to customize the behavior of the logger:LogInfoLevel
: a field with a configurable name can be added for the numeric verbosity level of info messages. Error messages have no verbosity and thus are logged without that field.DPanicOnBugs
: by default, zapr callszap.DPanic
for invalid log calls to emit an error message with details about the invalid call and, depending on the configuration of the zap logger, cause a panic. This can be disabled in zapr.AllowZapFields
: passing a zap field instead of a key/value pair is non-portable and considered an error by default. Users who want to do that because they know that the underlyingLogger
is based on zap can disable that check.ErrorKey
: the default "error" name forError
messages can be overridden.
- The source code attribution of the messages for invalid log calls now refers to the actual call site instead of
zapr.go
. - Various documentation enhancements and more thorough testing.
- Bump zapr dependency to 1.19.0, which supports near-arbitrary negative levels, which allows full use of logr's
V()
range (up toV(127)
)