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
Click to show internal directories.
Click to hide internal directories.