logger

package
v0.43.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToContext added in v0.42.0

func AddToContext(ctx context.Context, origin logr.Logger) context.Context

AddToContext adds given logger into context

func New

func New(origin logr.LogSink) logr.Logger

New returns a new logger cannot be used concurrently

func WithContext added in v0.42.0

func WithContext(ctx context.Context) logr.Logger

WithContext returns logger from context or global

Types

type Logger

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

Logger wraps logger methods with metrics

func (*Logger) Enabled

func (lw *Logger) Enabled(level int) bool

Enabled implements logr.Logger

func (*Logger) Error

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

Error implements logr.Logger

func (*Logger) Info

func (lw *Logger) Info(level int, msg string, keysAndValues ...interface{})

Info implements logr.Logger

func (*Logger) Init

func (lw *Logger) Init(info logr.RuntimeInfo)

Init implements logr.Logger

func (*Logger) WithName

func (lw *Logger) WithName(name string) logr.LogSink

WithName implements logr.Logger

func (*Logger) WithValues

func (lw *Logger) WithValues(keysAndValues ...interface{}) logr.LogSink

WithValues implements logr.Logger

Jump to

Keyboard shortcuts

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