log

package
v1.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogLevelNames = map[LogLevel]string{
	INFO:    "info",
	WARNING: "warning",
	ERROR:   "error",
	FATAL:   "fatal",
}

Functions

func InitializeLogging

func InitializeLogging(comp string)

func LogLibvirtLogLine

func LogLibvirtLogLine(logger *FilteredLogger, line string)

func LogQemuLogLine

func LogQemuLogLine(logger *FilteredLogger, line string)

Types

type FilteredLogger

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

func DefaultLogger

func DefaultLogger() *FilteredLogger

func Logger

func Logger(component string) *FilteredLogger

func MakeLogger

func MakeLogger(logger klog.Logger) *FilteredLogger

Wrap a go-kit logger in a FilteredLogger. Not cached

func (FilteredLogger) Critical

func (l FilteredLogger) Critical(msg string)

func (FilteredLogger) Criticalf

func (l FilteredLogger) Criticalf(msg string, args ...interface{})

func (FilteredLogger) Error

func (l FilteredLogger) Error(msg string)

func (FilteredLogger) Errorf

func (l FilteredLogger) Errorf(msg string, args ...interface{})

func (FilteredLogger) Info

func (l FilteredLogger) Info(msg string)

func (FilteredLogger) Infof

func (l FilteredLogger) Infof(msg string, args ...interface{})

func (FilteredLogger) Level

func (l FilteredLogger) Level(level LogLevel) *FilteredLogger

func (FilteredLogger) Log

func (l FilteredLogger) Log(params ...interface{}) error

func (FilteredLogger) Object

func (FilteredLogger) Reason

func (l FilteredLogger) Reason(err error) *FilteredLogger

func (*FilteredLogger) SetIOWriter

func (l *FilteredLogger) SetIOWriter(w io.Writer)

SetIOWriter is meant to be used for testing. "log" and "glog" logs are sent to /dev/nil. KubeVirt related log messages will be sent to this writer

func (*FilteredLogger) SetLogLevel

func (l *FilteredLogger) SetLogLevel(filterLevel LogLevel) error

func (*FilteredLogger) SetLogger

func (l *FilteredLogger) SetLogger(logger klog.Logger) *FilteredLogger

func (*FilteredLogger) SetVerbosityLevel

func (l *FilteredLogger) SetVerbosityLevel(level int) error

func (FilteredLogger) V

It would be consistent to return an error from this function, but a multi-value function would break the primary use case: log.V(2).Info()....

func (FilteredLogger) Warning

func (l FilteredLogger) Warning(msg string)

func (FilteredLogger) Warningf

func (l FilteredLogger) Warningf(msg string, args ...interface{})

func (FilteredLogger) With

func (l FilteredLogger) With(obj ...interface{}) *FilteredLogger

type FilteredVerbosityLogger

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

func (FilteredVerbosityLogger) Info

func (l FilteredVerbosityLogger) Info(msg string)

func (FilteredVerbosityLogger) Infof

func (l FilteredVerbosityLogger) Infof(msg string, args ...interface{})

func (FilteredVerbosityLogger) Log

func (l FilteredVerbosityLogger) Log(params ...interface{}) error

func (FilteredVerbosityLogger) Object

func (FilteredVerbosityLogger) Reason

func (FilteredVerbosityLogger) V

type LogError

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

func (LogError) Error

func (e LogError) Error() string

type LogLevel

type LogLevel int32
const (
	INFO LogLevel = iota
	WARNING
	ERROR
	FATAL
)

type LoggableObject

type LoggableObject interface {
	metav1.ObjectMetaAccessor
	k8sruntime.Object
}

type NullLogger

type NullLogger struct{}

func (NullLogger) Log

func (n NullLogger) Log(params ...interface{}) error

Jump to

Keyboard shortcuts

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