Commit Graph

2 Commits

Author SHA1 Message Date
Patrick Ohly
cb6a653777 klog 2.20.0, logr v1.1.0, zapr v1.1.0
This replaces the experimental logr v0.4 with the stable v1.1.0
release. This is a breaking API change for some users because:
- Comparing logr.Logger against nil is not possible anymore:
  it's now a struct instead of an interface. Code which
  allows a nil logger should switch to *logr.Logger as type.
- Logger implementations must be updated in lockstep.

Instead of updating the forked zapr code in json.go, directly using
the original go-logr/zapr is simpler and avoids duplication of effort.

The updated zapr supports logging of numeric verbosity. Error messages
don't have a verbosity (= always get logged), so "v" is not getting
added to them anymore.

Source code logging for panic messages got fixed so that it references
the code with the invalid log call, not the json.go implementation.

Finally, zapr includes additional information in its panic
messages ("zap field", "ignored key", "invalid key").
2021-09-09 14:43:43 +02:00
Patrick Ohly
562a39a2e1 logging: support call depth via logr, structured logging
The new releases of klog (via klogr) and logr expose support for call
traces via a new WithCallDepth API in logr.

The new klogr can be configured to pass structured log entries into
klog instead of turning them into a single text message.
2021-01-28 17:35:28 +01:00