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