Skip to content

v1.1.0

Compare
Choose a tag to compare
@pohly pohly released this 25 Aug 15:53
· 42 commits to master since this release

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 calls zap.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 underlying Logger is based on zap can disable that check.
    • ErrorKey: the default "error" name for Error 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 to V(127))