Debian Codegraph @

klogr/README.md

raw
1 # Minimal Go logging using klog
2
3 This package implements the [logr interface](https://github.com/go-logr/logr)
4 in terms of Kubernetes' [klog](https://github.com/kubernetes/klog). This
5 provides a relatively minimalist API to logging in Go, backed by a well-proven
6 implementation.
7
8 Because klogr was implemented before klog itself added supported for
9 structured logging, the default in klogr is to serialize key/value
10 pairs with JSON and log the result as text messages via klog. This
11 does not work well when klog itself forwards output to a structured
12 logger.
13
14 Therefore the recommended approach is to let klogr pass all log
15 messages through to klog and deal with structured logging there. Just
16 beware that the output of klog without a structured logger is meant to
17 be human-readable, in contrast to the JSON-based traditional format.
18
19 This is a BETA grade implementation.