Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Background ¶
Background returns the background logger. Current implementation uses klog as the background logger.
func FromContextOrBackground ¶
FromContextOrBackground returns a logger from the context if it exists, otherwise it returns a background logger. Current implementation uses klog as the background logger.
func NewContext ¶
NewContext returns a new context with the provided logger.
func ValueAsMap ¶
ValueAsMap converts a value to a map[string]any. It returns a map with an "error" key if the conversion fails. NOTE:
It should ONLY be used when the default klog formatter failed to serialize the value in JSON format. Protobuf messages had implemented `String()` method, which the value is hard to read. Use this method to bypass instead.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.