Documentation
¶
Overview ¶
Package logger defines an interface for adding a structured logger to a context and retrieving it again. The fallback when a context doesn't have a logger is the global klog logger.
This uses the same context key as logr and thus is compatible with code that uses that interface. The difference is that the Get function here never returns nil.
Also contains an extension of klog.KObj which includes the type of the object in the log output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ObjectRefWithType ¶
ObjectRef references a kubernetes object
func KObjWithType ¶
func KObjWithType(obj klog.KMetadata) ObjectRefWithType
KObj returns ObjectRefWithType from ObjectMeta
func (ObjectRefWithType) String ¶
func (ref ObjectRefWithType) String() string
Directories
¶
| Path | Synopsis |
|---|---|
|
Package testinglogger contains an implementation of the logr interface which is logging through a function like testing.TB.Log function.
|
Package testinglogger contains an implementation of the logr interface which is logging through a function like testing.TB.Log function. |
Click to show internal directories.
Click to hide internal directories.