logr

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 28

Documentation

Index

Constants

View Source
const (
	EnvDevelopment = "LOG_DEVELOPMENT"
	EnvStructured  = "LOG_STRUCTURED"
	EnvLevel       = "LOG_LEVEL"
)

Variables

This section is empty.

Functions

func WithName

func WithName(name string, kvpair ...interface{}) logr.Logger

WithName returns a named logger.

Types

type Sink

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

Sink -.

func (*Sink) Enabled

func (s *Sink) Enabled(level int) bool

Enabled returns whether logger is enabled.

func (*Sink) Error

func (s *Sink) Error(err error, message string, kvpair ...interface{})

Error logs an error.

func (*Sink) Info

func (s *Sink) Info(_ int, message string, kvpair ...interface{})

Info logs at info.

func (*Sink) Init

func (s *Sink) Init(_ logr.RuntimeInfo)

Init builds the delegate logger.

func (*Sink) WithName

func (s *Sink) WithName(name string) logr.LogSink

WithName returns a logger with name.

func (*Sink) WithValues

func (s *Sink) WithValues(kvpair ...interface{}) logr.LogSink

WithValues returns a logger with values.

Jump to

Keyboard shortcuts

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