Versions in this module Expand all Collapse all v0 v0.1.1 Mar 7, 2024 v0.1.0 Jan 12, 2023 Changes in this version + const CallPathDefault + const CallPathDepth1 + const CallPathDepth2 + const CallPathDepth3 + const ColorOff + const ColorOn + const DefaultLogFile + const EnvLogLevelDebug + const EnvLogLevelError + const EnvLogLevelFatal + const EnvLogLevelInfo + const EnvLogLevelTrace + const EnvLogLevelWarn + const LocationLocal + const LogLevelDebug + const LogLevelDefault + const LogLevelError + const LogLevelFatal + const LogLevelInfo + const LogLevelTrace + const LogLevelUnspecified + const LogLevelWarn + const TimeFormatDefault + var LogLevelMap = map[int]string + func Debugf(format string, v ...interface{}) + func Debugln(v ...interface{}) + func Errorf(format string, v ...interface{}) + func Errorln(v ...interface{}) + func Fatalf(format string, v ...interface{}) + func Fatalln(v ...interface{}) + func Infof(format string, v ...interface{}) + func Infoln(v ...interface{}) + func NewDefaultLogger() + func SetCallPath(caller int) + func SetDefaultLogFile() + func SetFormatter(f Formatter) + func SetLevel(lv string) + func SetLogFile(path string) + func SetSink(s Sink) + func Tracef(format string, v ...interface{}) + func Traceln(v ...interface{}) + func Warnf(format string, v ...interface{}) + func Warnln(v ...interface{}) + type Context map[string]string + type Entry struct + Context Context + func NewEntry() *Entry + func SetContext(ctx Context) *Entry + func (e *Entry) Debugf(format string, v ...interface{}) + func (e *Entry) Debugln(v ...interface{}) + func (e *Entry) Errorf(format string, v ...interface{}) + func (e *Entry) Errorln(v ...interface{}) + func (e *Entry) Fatalf(format string, v ...interface{}) + func (e *Entry) Fatalln(v ...interface{}) + func (e *Entry) Infof(format string, v ...interface{}) + func (e *Entry) Infoln(v ...interface{}) + func (e *Entry) Tracef(format string, v ...interface{}) + func (e *Entry) Traceln(v ...interface{}) + func (e *Entry) Warnf(format string, v ...interface{}) + func (e *Entry) Warnln(v ...interface{}) + func (e *Entry) WithContext(ctx Context) *Entry + type Fields struct + File string + Func string + Level string + Line int + Msg string + Timestamp string + type Formatter interface + Print func(fields Fields, ctx Context) string + SetColor func(color bool) + type JSONFormatter struct + Color bool + func (t *JSONFormatter) Print(fields Fields, ctx Context) string + func (t *JSONFormatter) SetColor(color bool) + type Logger struct + Async bool + CallPath int + Level int + Sink Sink + Writer io.Writer + func NewLogger(writer io.Writer, level, caller int) *Logger + func (l *Logger) Debugf(format string, v ...interface{}) + func (l *Logger) Debugln(v ...interface{}) + func (l *Logger) EnableAsync() *Logger + func (l *Logger) Errorf(format string, v ...interface{}) + func (l *Logger) Errorln(v ...interface{}) + func (l *Logger) Fatalf(format string, v ...interface{}) + func (l *Logger) Fatalln(v ...interface{}) + func (l *Logger) Infof(format string, v ...interface{}) + func (l *Logger) Infoln(v ...interface{}) + func (l *Logger) SetCallPath(callPath int) + func (l *Logger) SetContext(ctx Context) *Entry + func (l *Logger) SetFormatter(f Formatter) *Logger + func (l *Logger) SetLevel(level int) + func (l *Logger) SetLevelByName(level string) + func (l *Logger) Tracef(format string, v ...interface{}) + func (l *Logger) Traceln(v ...interface{}) + func (l *Logger) Warnf(format string, v ...interface{}) + func (l *Logger) Warnln(v ...interface{}) + type Sink interface + Output func() error + Receiver func() chan logEvent + type StdioSink struct + func (s *StdioSink) Output() error + func (s *StdioSink) Receiver() chan logEvent + type TextFormatter struct + Color bool + func (t *TextFormatter) Print(fields Fields, ctx Context) string + func (t *TextFormatter) SetColor(color bool)