Documentation ¶
Index ¶
- Variables
- func Debug(i ...any)
- func Debugf(format string, i ...any)
- func Err(i ...any)
- func Errf(format string, i ...any)
- func Fatal(i ...any)
- func Fatalf(format string, i ...any)
- func Info(i ...any)
- func Infof(format string, i ...any)
- func Panic(i ...any)
- func Panicf(format string, i ...any)
- func PartCaller(skip int, shortFile bool) *partCaller
- func PartDateTime(layout string) *partDateTime
- func PartLevel() *partLevel
- func PartMessage() *partMessage
- func PartSince() *partSince
- func PartString(raw string) *partString
- func SetDaily(folder, prefix string)
- func Warn(i ...any)
- func Warnf(format string, i ...any)
- type Args
- type DailyWriter
- type ILogger
- type IPart
- type Level
- type Logger
- func (l *Logger) Debug(i ...any)
- func (l *Logger) Debugf(format string, i ...any)
- func (l *Logger) Err(i ...any)
- func (l *Logger) Errf(format string, i ...any)
- func (l *Logger) Fatal(i ...any)
- func (l *Logger) Fatalf(format string, i ...any)
- func (l *Logger) Info(i ...any)
- func (l *Logger) Infof(format string, i ...any)
- func (l *Logger) Log(level Level, msg string)
- func (l *Logger) Panic(i ...any)
- func (l *Logger) Panicf(format string, i ...any)
- func (l *Logger) Use(parts ...IPart) *Logger
- func (l *Logger) Warn(i ...any)
- func (l *Logger) Warnf(format string, i ...any)
- func (l *Logger) With(parts ...IPart) ILogger
- func (l *Logger) Write(p []byte) (n int, err error)
- type OptionFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = New()
Functions ¶
func PartCaller ¶
func PartDateTime ¶
func PartDateTime(layout string) *partDateTime
func PartMessage ¶
func PartMessage() *partMessage
func PartString ¶
func PartString(raw string) *partString
Types ¶
type DailyWriter ¶
type DailyWriter struct {
// contains filtered or unexported fields
}
func NewDailyWriter ¶
func NewDailyWriter(filenameFormat string) *DailyWriter
type ILogger ¶
type ILogger interface { Debug(i ...any) Debugf(format string, i ...any) Info(i ...any) Infof(format string, i ...any) Warn(i ...any) Warnf(format string, i ...any) Err(i ...any) Errf(format string, i ...any) Fatal(i ...any) Fatalf(format string, i ...any) Panic(i ...any) Panicf(format string, i ...any) }
type Logger ¶
type Logger struct { Level Level // contains filtered or unexported fields }
func NewLogger ¶
func NewLogger(options ...OptionFunc) *Logger
type OptionFunc ¶
type OptionFunc func(l *Logger)
func OptLevel ¶
func OptLevel(lv Level) OptionFunc
func OptOutput ¶
func OptOutput(o io.Writer) OptionFunc
Click to show internal directories.
Click to hide internal directories.