Documentation
¶
Overview ¶
Package logger provides a logging capability for toolhive for running locally as a CLI and in Kubernetes
Package logger provides a logging capability for toolhive for running locally as a CLI and in Kubernetes
Index ¶
- func Debug(msg string, args ...any)
- func Debugf(msg string, args ...any)
- func Error(msg string, args ...any)
- func Errorf(msg string, args ...any)
- func Info(msg string, args ...any)
- func Infof(msg string, args ...any)
- func Initialize()
- func NewLogr() logr.Logger
- func Panic(msg string, args ...any)
- func Panicf(msg string, args ...any)
- func Warn(msg string, args ...any)
- func Warnf(msg string, args ...any)
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize()
Initialize creates and configures the appropriate logger. If the UNSTRUCTURED_LOGS is set to true, it will output plain log message with only time and LogLevelType (INFO, DEBUG, ERROR, WARN)). Otherwise it will create a standard structured slog logger
func Panic ¶ added in v0.0.34
Panic logs a message at error level using the singleton logger and panics the program.
func Panicf ¶ added in v0.0.34
Panicf logs a message at error level using the singleton logger and panics the program.
Types ¶
type Logger ¶
type Logger interface { Debug(msg string, args ...any) Debugf(msg string, args ...any) Info(msg string, args ...any) Infof(msg string, args ...any) Warn(msg string, args ...any) Warnf(msg string, args ...any) Error(msg string, args ...any) Errorf(msg string, args ...any) Panic(msg string, args ...any) Panicf(msg string, args ...any) }
Logger provides a unified interface for logging