logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: Apache-2.0 Imports: 1 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	// Info logs a message with optional structured data. Structured data must
	// be supplied as an array that alternates between string keys and values of
	// an arbitrary type.
	Info(msg string, keysAndValues ...interface{})

	// Debug logs a message with optional structured data. Structured data must
	// be supplied as an array that alternates between string keys and values of
	// an arbitrary type.
	Debug(msg string, keysAndValues ...interface{})

	// WithValues returns a Logger that will include the supplied structured
	// data with any subsequent messages it logs. Structured data must
	// be supplied as an array that alternates between string keys and values of
	// an arbitrary type.
	WithValues(keysAndValues ...interface{}) Logger
}

A Logger logs messages. Messages may be supplemented by structured data.

func NewLogrLogger

func NewLogrLogger(l logr.Logger) Logger

NewLogrLogger returns a Logger that is satisfied by the supplied logr.Logger, which may be satisfied in turn by various logging implementations (Zap, klog, etc). Debug messages are logged at V(1).

func NewNopLogger

func NewNopLogger() Logger

NewNopLogger returns a Logger that does nothing.

Jump to

Keyboard shortcuts

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