utils

package
v0.104.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoggerFromTestLogger

func NewLoggerFromTestLogger(internalLogger Logger) logging.Logger

NewLoggerFromTestLogger returns a logging.Logger which wraps the test framework logger defined in this package. It is intended for tests which must provide a logging.Logger, for example when they start an agent.

Types

type Logger

type Logger interface {
	Log(message string)
	Logln(message string)
	Logf(format string, a ...interface{})
	Logfln(format string, a ...interface{})
	WithTimestamp() Logger
}

Logger provides a simplified, plain logging interface in contrast to logr.Logger

func NewDiscardLogger

func NewDiscardLogger() Logger

func NewLogger

func NewLogger() Logger

NewLogger creates a new logger that writes to stdout

func NewLoggerFromWriter

func NewLoggerFromWriter(writer io.Writer) Logger

NewLoggerFromWriter creates a new logger that writes to the given writer

Jump to

Keyboard shortcuts

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