logging

package
v3.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 6 Imported by: 0

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 WithEventRecorder

func WithEventRecorder(logger logr.Logger, recorder record.EventRecorder, object runtime.Object) logr.Logger

func WithLabels

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

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

func WithNoRecord

func WithNoRecord(logger logr.Logger) logr.Logger

WithNoRecord adds a log key that suppresses the recorder

Types

type EventRecordingLogger

type EventRecordingLogger struct {
	logr.Logger
	// contains filtered or unexported fields
}

func (*EventRecordingLogger) Info

func (erl *EventRecordingLogger) Info(msg string, keyvals ...interface{})

func (*EventRecordingLogger) WithName

func (erl *EventRecordingLogger) WithName(name string) logr.Logger

func (*EventRecordingLogger) WithValues

func (erl *EventRecordingLogger) WithValues(values ...interface{}) logr.Logger

Jump to

Keyboard shortcuts

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