Versions in this module Expand all Collapse all v1 v1.1.0 Jul 2, 2018 v1.0.0 Jul 26, 2017 Changes in this version + var ErrInvalidLevel = errors.New("invalid level") + var Now = time.Now + func Debug(msg string) + func Debugf(msg string, v ...interface{}) + func Error(msg string) + func Errorf(msg string, v ...interface{}) + func Fatal(msg string) + func Fatalf(msg string, v ...interface{}) + func Info(msg string) + func Infof(msg string, v ...interface{}) + func SetHandler(h Handler) + func SetLevel(l Level) + func SetLevelFromString(s string) + func Warn(msg string) + func Warnf(msg string, v ...interface{}) + type Entry struct + Fields Fields + Level Level + Logger *Logger + Message string + Timestamp time.Time + func NewEntry(log *Logger) *Entry + func Trace(msg string) *Entry + func WithError(err error) *Entry + func WithField(key string, value interface{}) *Entry + func WithFields(fields Fielder) *Entry + func (e *Entry) Debug(msg string) + func (e *Entry) Debugf(msg string, v ...interface{}) + func (e *Entry) Error(msg string) + func (e *Entry) Errorf(msg string, v ...interface{}) + func (e *Entry) Fatal(msg string) + func (e *Entry) Fatalf(msg string, v ...interface{}) + func (e *Entry) Info(msg string) + func (e *Entry) Infof(msg string, v ...interface{}) + func (e *Entry) Stop(err *error) + func (e *Entry) Trace(msg string) *Entry + func (e *Entry) Warn(msg string) + func (e *Entry) Warnf(msg string, v ...interface{}) + func (e *Entry) WithError(err error) *Entry + func (e *Entry) WithField(key string, value interface{}) *Entry + func (e *Entry) WithFields(fields Fielder) *Entry + type Fielder interface + Fields func() Fields + type Fields map[string]interface + func (f Fields) Fields() Fields + func (f Fields) Get(name string) interface{} + func (f Fields) Names() (v []string) + type Handler interface + HandleLog func(*Entry) error + type HandlerFunc func(*Entry) error + func (f HandlerFunc) HandleLog(e *Entry) error + type Interface interface + Debug func(msg string) + Debugf func(msg string, v ...interface{}) + Error func(msg string) + Errorf func(msg string, v ...interface{}) + Fatal func(msg string) + Fatalf func(msg string, v ...interface{}) + Info func(msg string) + Infof func(msg string, v ...interface{}) + Trace func(msg string) *Entry + Warn func(msg string) + Warnf func(msg string, v ...interface{}) + WithError func(err error) *Entry + WithField func(key string, value interface{}) *Entry + WithFields func(fields Fielder) *Entry + var Log Interface = &Logger{ ... } + type Level int + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const InvalidLevel + const WarnLevel + func MustParseLevel(s string) Level + func ParseLevel(s string) (Level, error) + func (l *Level) UnmarshalJSON(b []byte) error + func (l Level) MarshalJSON() ([]byte, error) + func (l Level) String() string + type Logger struct + Handler Handler + Level Level + func (l *Logger) Debug(msg string) + func (l *Logger) Debugf(msg string, v ...interface{}) + func (l *Logger) Error(msg string) + func (l *Logger) Errorf(msg string, v ...interface{}) + func (l *Logger) Fatal(msg string) + func (l *Logger) Fatalf(msg string, v ...interface{}) + func (l *Logger) Info(msg string) + func (l *Logger) Infof(msg string, v ...interface{}) + func (l *Logger) Trace(msg string) *Entry + func (l *Logger) Warn(msg string) + func (l *Logger) Warnf(msg string, v ...interface{}) + func (l *Logger) WithError(err error) *Entry + func (l *Logger) WithField(key string, value interface{}) *Entry + func (l *Logger) WithFields(fields Fielder) *Entry