clog

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LEVEL_INFO      = 0
	LEVEL_DEBUG     = 1
	LEVEL_DEBUG_ALL = 2
)

Variables

This section is empty.

Functions

func Diff

func Diff(x, y interface{}) string

func IntoContext

func IntoContext(ctx context.Context, logger *Logger) context.Context

func LogrIntoContext

func LogrIntoContext(ctx context.Context, logger logr.Logger) context.Context

func PrintObjectDiff

func PrintObjectDiff(out io.Writer, x, y interface{})

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func FromContext

func FromContext(ctx context.Context) *Logger

func NewLogger

func NewLogger(log logr.Logger) *Logger

func (*Logger) Debug

func (l *Logger) Debug() *Logger

func (*Logger) DebugAll

func (l *Logger) DebugAll() *Logger

func (*Logger) DumpObject

func (l *Logger) DumpObject(scheme *apiruntime.Scheme, obj NamedObject, msg string)

func (*Logger) Enabled

func (l *Logger) Enabled() bool

func (*Logger) Error

func (l *Logger) Error(err error, msg string, keysAndValues ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, keysAndValues ...interface{})

func (*Logger) PrintObjectDiff

func (l *Logger) PrintObjectDiff(x, y interface{})

func (*Logger) WithCaller

func (l *Logger) WithCaller() *Logger

func (*Logger) WithName

func (l *Logger) WithName(name string) *Logger

func (*Logger) WithValues

func (l *Logger) WithValues(keysAndValues ...interface{}) *Logger

type NamedObject

type NamedObject interface {
	GetName() string
	DeepCopyObject() apiruntime.Object
}

Jump to

Keyboard shortcuts

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