logging

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	logr.Logger

	// Debug prints the message and key/values at debug level (level 1) in go-logr
	Debug(msg string, keysAndValues ...interface{})

	// LogWriterDebug returns the write end of a pipe which streams data to
	// the logger at debug level.
	LogWriterDebug(msg string, keysAndValues ...interface{}) io.WriteCloser

	// LogWriterInfo returns the write end of a pipe which streams data to
	// the logger at info level.
	LogWriterInfo(msg string, keysAndValues ...interface{}) io.WriteCloser
}

Logger is a simple wrapper around go-logr to simplify distinguishing debug logs from info.

func NewLogger

func NewLogger(name string, keysAndValues ...interface{}) Logger

NewLogger creates a new Logger using the specified name and keys/values.

func WithValues

func WithValues(l logr.Logger, keysAndValues ...interface{}) Logger

WithValues creates a new Logger using the passed logr.Logger with the specified key/values.

Jump to

Keyboard shortcuts

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