logging

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 8 Imported by: 15

Documentation

Index

Constants

View Source
const (
	// EventTypeDontRecord will tell the logger not to emit a Kubernetes event for this log
	// line
	EventTypeDontRecord = "DontRecord"
)

Variables

This section is empty.

Functions

func RecorderAwareCaller

func RecorderAwareCaller() kitlog.Valuer

RecorderAwareCaller returns the file and line where the Log method was invoked, adjusting for the fact that this may have been hijacked by the event recorder.

func WithLabels

func WithLabels(logger kitlog.Logger, labels map[string]string, labelKeyPrefix string) kitlog.Logger

WithLabels decorates a kitlog.Logger so that any log entries contain all labels which keys are prefix by labelKeyPrefix

func WithNoRecord

func WithNoRecord(logger kitlog.Logger) kitlog.Logger

WithNoRecord adds a log key that suppresses the recorder

func WithRecorder

func WithRecorder(logger kitlog.Logger, recorder record.EventRecorder, object runtime.Object) kitlog.Logger

WithRecorder decorates a kitlog.Logger so that any log entries that contain an appropriate event will also log to the Kubernetes resource using events.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL