Documentation
¶
Index ¶
- func Debug(args ...any)
- func Debugf(format string, args ...any)
- func Error(args ...any)
- func Errorf(format string, args ...any)
- func Fatal(args ...any)
- func Fatalf(format string, args ...any)
- func Info(args ...any)
- func Infof(format string, args ...any)
- func SetVerbose()
- func Warn(args ...any)
- func Warnf(format string, args ...any)
- type Base
- type Level
- type Logger
- func (l *Logger) Debug(args ...any)
- func (l *Logger) Debugf(format string, args ...any)
- func (l *Logger) Error(args ...any)
- func (l *Logger) Errorf(format string, args ...any)
- func (l *Logger) Fatal(args ...any)
- func (l *Logger) Fatalf(format string, args ...any)
- func (l *Logger) Info(args ...any)
- func (l *Logger) Infof(format string, args ...any)
- func (l *Logger) SetLevel(v Level)
- func (l *Logger) Warn(args ...any)
- func (l *Logger) Warnf(format string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetVerbose ¶
func SetVerbose()
Types ¶
type Base ¶ added in v0.5.0
Base is the interface that underlies the Logger. It receives the caller skip count, log level, and formatted message.
type Level ¶ added in v0.5.0
type Level int32
Level defines all the available levels we can log at.
const ( // DebugLevel is the lowest level of logging. // Debug logs are intended for debugging and development purposes. DebugLevel Level = iota + 1 // InfoLevel is used for user-facing progress and status messages. InfoLevel // WarnLevel is used for undesired but relatively expected events, // which may indicate a problem. WarnLevel // ErrorLevel is used for undesired and unexpected events that // the program can recover from. ErrorLevel // FatalLevel is used for undesired and unexpected events that // the program cannot recover from. FatalLevel )
type Logger ¶ added in v0.5.0
type Logger struct {
// contains filtered or unexported fields
}
Logger logs messages to io.Writer at various log levels.
func NewLogger ¶ added in v0.5.0
NewLogger creates and returns a new instance of Logger. Default level is InfoLevel (Debug messages are suppressed unless SetVerbose is called).