Documentation ¶
Index ¶
- func Debug(i ...any)
- func Debugf(format string, i ...any)
- func Err(i ...any)
- func Errf(format string, i ...any)
- func Info(i ...any)
- func Infof(format string, i ...any)
- func PartCaller(shortFile bool) *partCaller
- func PartDateTime(layout string) *partDateTime
- func PartKV(k, v any) *partString
- func PartLevel() *partLevel
- func PartMessage() *partMessage
- func PartSince() *partSince
- func PartString(raw string) *partString
- func SetDefault(l *Logger)
- 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) Info(i ...any)
- func (l *Logger) Infof(format string, i ...any)
- func (l *Logger) Log(level Level, format string, msgs []any)
- func (l *Logger) Warn(i ...any)
- func (l *Logger) Warnf(format string, i ...any)
- func (l *Logger) With(args ...any) ILogger
- func (l *Logger) Write(p []byte) (n int, err error)
- type OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PartCaller ¶
func PartCaller(shortFile bool) *partCaller
func PartDateTime ¶
func PartDateTime(layout string) *partDateTime
func PartMessage ¶
func PartMessage() *partMessage
func PartString ¶
func PartString(raw string) *partString
func SetDefault ¶
func SetDefault(l *Logger)
Types ¶
type DailyWriter ¶
type DailyWriter struct {
// contains filtered or unexported fields
}
func NewDailyWriter ¶
func NewDailyWriter(folder, prefix string) *DailyWriter
type ILogger ¶
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
func OptPart ¶
func OptPart(parts ...IPart) OptionFunc
Click to show internal directories.
Click to hide internal directories.