logger

package
v0.0.0-...-824b123 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintErrorExplanation

func PrintErrorExplanation(log LeveledLogger, apiError pve.APIError)

PrintErrorExplanation print on the standard output an error message. If the message is a JSON object, the function will print on line for each key-value pair --- A note for contributors: Should the parameter log LeveledLogger, be a loggerCallback? e.g. func PrintErrorExplanation(loggerCallback func(string ...any), message string) and then use loggerCallback(format, params)?

Types

type LeveledLogger

type LeveledLogger interface {
	Debug(v ...any)
	Debugf(format string, v ...any)

	Info(v ...any)
	Infof(format string, v ...any)

	Warn(v ...any)
	Warnf(format string, v ...any)

	Error(v ...any)
	Errorf(format string, v ...any)

	Fatal(v ...any)
	Fatalf(format string, v ...any)
}

LeveledLogger represents a leveled logger interface.

func NewLogger

func NewLogger(logLevel string) (LeveledLogger, error)

NewLogger creates a new LeveledLogger compliant logger

Jump to

Keyboard shortcuts

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