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 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
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)
}
Logger provides a unified interface for logging
Click to show internal directories.
Click to hide internal directories.