Documentation
¶
Index ¶
- Variables
- func Debug(message string)
- func Debugf(format string, args ...any)
- func Error(message string)
- func Errorf(format string, args ...any)
- func Fatal(message string)
- func Fatalf(format string, args ...any)
- func Info(message string)
- func Infof(format string, args ...any)
- func Log(level Level, message string)
- func Logf(level Level, message string, args ...any)
- func SetOutput(output io.Writer)
- func SetThreshold(threshold Level)
- func Warn(message string)
- func Warnf(format string, args ...any)
- type Level
- type Logger
- func (logger *Logger) Debug(message string)
- func (logger *Logger) Debugf(format string, args ...any)
- func (logger *Logger) Error(message string)
- func (logger *Logger) Errorf(format string, args ...any)
- func (logger *Logger) Fatal(message string)
- func (logger *Logger) Fatalf(format string, args ...any)
- func (logger *Logger) GetThreshold() Level
- func (logger *Logger) Info(message string)
- func (logger *Logger) Infof(format string, args ...any)
- func (logger *Logger) Log(level Level, message string)
- func (logger *Logger) Logf(level Level, format string, args ...any)
- func (logger *Logger) SetOutput(output io.Writer)
- func (logger *Logger) SetThreshold(threshold Level)
- func (logger *Logger) Warn(message string)
- func (logger *Logger) Warnf(format string, args ...any)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidLevelString = errors.New("invalid level, must be one of DEBUG, INFO, WARN, ERROR or FATAL")
)
Functions ¶
func SetThreshold ¶
func SetThreshold(threshold Level)
SetThreshold sets the minimum level output by the default logger
Types ¶
type Level ¶
type Level string
func GetThreshold ¶ added in v0.0.2
func GetThreshold() Level
func LevelFromString ¶ added in v0.1.0
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) GetThreshold ¶ added in v0.0.2
func (*Logger) SetThreshold ¶
Click to show internal directories.
Click to hide internal directories.