Documentation
¶
Overview ¶
Package testinglogger contains an implementation of the logr interface which is logging through a function like testing.TB.Log function. Serialization of the structured log parameters is done in the format used also by klog/klogr.
The code had to be copied because:
- klog/klogr always prints to the global klog
- go-logr/stdr (a very similar code) allows redirecting output, but its own functions then appear as source code location because they are not calling t.Helper()
- we want to output *all* messages regardless of their log level; "go test" will suppress output by default unless a test failed, in which case we want all output that we can get
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.