Skip to content

v1.1.0

Compare
Choose a tag to compare
@thockin thockin released this 23 Aug 18:43
· 287 commits to master since this release
c908498

This release has several bugfixes and feature improvements.

  • logr: fix incremental WithCallDepth() calls.
  • logr: expose the LogSink via GetSink() and SetSink() for custom WithSomething(logr, something) integrations.
  • logr: add an optional CallStackHelperLogSink interface so that implementations which have a function to flag helper functions (e.g. testing.T has Helper()) can attribute callers correctly. Log helper functions should prefer to use WithCallStackHelper() instead WithCallDepth(1) for maximum reach. Note the signature of WithCallStackHelper() - the caller must ALSO call the returned function.
  • funcr: add a LogTimestamp option.
  • funcr: support embedding a funcr.Formatter in other logger implementations. Used in testing.NewTestLogger()
  • testing: proper caller attribution when using NewTestLogger()
  • testing: enable options for LogTimestamp and Verbosity in NewTestLoggerWithOptions()
  • misc: Godoc clarifications