Documentation
¶
Overview ¶
log is a simple user-friendly logger. The intent is clean in-the-terminal experience and readability.
Index ¶
- func Debug(msg string, pairs ...any)
- func Debugf(msg string, values ...any)
- func Error(msg string, pairs ...any)
- func Errorf(msg string, values ...any)
- func Fatal(msg string, pairs ...any)
- func Fatalf(msg string, values ...any)
- func Info(msg string, pairs ...any)
- func Infof(msg string, values ...any)
- func Panic(msg string, pairs ...any)
- func Panicf(msg string, values ...any)
- func Warn(msg string, pairs ...any)
- func Warnf(msg string, values ...any)
- type Level
- type Logger
- func (self *Logger) Debug(msg string, pairs ...any)
- func (self *Logger) Debugf(msg string, values ...any)
- func (self *Logger) Error(msg string, pairs ...any)
- func (self *Logger) Errorf(msg string, values ...any)
- func (self *Logger) Fatal(msg string, pairs ...any)
- func (self *Logger) Fatalf(msg string, values ...any)
- func (self *Logger) Info(msg string, pairs ...any)
- func (self *Logger) Infof(msg string, values ...any)
- func (self *Logger) Panic(msg string, pairs ...any)
- func (self *Logger) Panicf(msg string, values ...any)
- func (self *Logger) SetLevel(l Level) *Logger
- func (self *Logger) SetOptions(o Options) *Logger
- func (self *Logger) SetOutput(w io.Writer) *Logger
- func (self *Logger) Warn(msg string, pairs ...any)
- func (self *Logger) Warnf(msg string, values ...any)
- func (self *Logger) With(pairs ...any) *Logger
- func (self *Logger) Write(b []byte) (int, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fatal ¶
Log an fatal-level message, with optional variadic key-value pairs, followed by a call to 'os.Exit(1)'.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) Fatal ¶
Log an fatal-level message, with optional variadic key-value pairs, followed by a call to 'os.Exit(1)'.
func (*Logger) SetOptions ¶
type Options ¶
type Options uint8
func (*Options) SetWithCaller ¶
func (o *Options) SetWithCaller()
func (*Options) SetWithLevel ¶
func (o *Options) SetWithLevel()
func (*Options) UnsetWithCaller ¶
func (o *Options) UnsetWithCaller()
func (*Options) UnsetWithLevel ¶
func (o *Options) UnsetWithLevel()
func (Options) WithCaller ¶
Click to show internal directories.
Click to hide internal directories.