Versions in this module Expand all Collapse all v1 v1.0.6 Jul 21, 2018 Changes in this version + const FieldKeyLevel + const FieldKeyMsg + const FieldKeyTime + var AllLevels = []Level + var ErrorKey = "error" + func AddHook(hook Hook) + func Debug(args ...interface{}) + func Debugf(format string, args ...interface{}) + func Debugln(args ...interface{}) + func Error(args ...interface{}) + func Errorf(format string, args ...interface{}) + func Errorln(args ...interface{}) + func Exit(code int) + func Fatal(args ...interface{}) + func Fatalf(format string, args ...interface{}) + func Fatalln(args ...interface{}) + func Info(args ...interface{}) + func Infof(format string, args ...interface{}) + func Infoln(args ...interface{}) + func Panic(args ...interface{}) + func Panicf(format string, args ...interface{}) + func Panicln(args ...interface{}) + func Print(args ...interface{}) + func Printf(format string, args ...interface{}) + func Println(args ...interface{}) + func RegisterExitHandler(handler func()) + func SetFormatter(formatter Formatter) + func SetLevel(level Level) + func SetOutput(out io.Writer) + func Warn(args ...interface{}) + func Warnf(format string, args ...interface{}) + func Warning(args ...interface{}) + func Warningf(format string, args ...interface{}) + func Warningln(args ...interface{}) + func Warnln(args ...interface{}) + type Entry struct + Buffer *bytes.Buffer + Data Fields + Level Level + Logger *Logger + Message string + Time time.Time + func NewEntry(logger *Logger) *Entry + func WithError(err error) *Entry + func WithField(key string, value interface{}) *Entry + func WithFields(fields Fields) *Entry + func WithTime(t time.Time) *Entry + func (entry *Entry) Debug(args ...interface{}) + func (entry *Entry) Debugf(format string, args ...interface{}) + func (entry *Entry) Debugln(args ...interface{}) + func (entry *Entry) Error(args ...interface{}) + func (entry *Entry) Errorf(format string, args ...interface{}) + func (entry *Entry) Errorln(args ...interface{}) + func (entry *Entry) Fatal(args ...interface{}) + func (entry *Entry) Fatalf(format string, args ...interface{}) + func (entry *Entry) Fatalln(args ...interface{}) + func (entry *Entry) Info(args ...interface{}) + func (entry *Entry) Infof(format string, args ...interface{}) + func (entry *Entry) Infoln(args ...interface{}) + func (entry *Entry) Panic(args ...interface{}) + func (entry *Entry) Panicf(format string, args ...interface{}) + func (entry *Entry) Panicln(args ...interface{}) + func (entry *Entry) Print(args ...interface{}) + func (entry *Entry) Printf(format string, args ...interface{}) + func (entry *Entry) Println(args ...interface{}) + func (entry *Entry) String() (string, error) + func (entry *Entry) Warn(args ...interface{}) + func (entry *Entry) Warnf(format string, args ...interface{}) + func (entry *Entry) Warning(args ...interface{}) + func (entry *Entry) Warningf(format string, args ...interface{}) + func (entry *Entry) Warningln(args ...interface{}) + func (entry *Entry) Warnln(args ...interface{}) + func (entry *Entry) WithError(err error) *Entry + func (entry *Entry) WithField(key string, value interface{}) *Entry + func (entry *Entry) WithFields(fields Fields) *Entry + func (entry *Entry) WithTime(t time.Time) *Entry + func (entry *Entry) Writer() *io.PipeWriter + func (entry *Entry) WriterLevel(level Level) *io.PipeWriter + type FieldLogger interface + Debug func(args ...interface{}) + Debugf func(format string, args ...interface{}) + Debugln func(args ...interface{}) + Error func(args ...interface{}) + Errorf func(format string, args ...interface{}) + Errorln func(args ...interface{}) + Fatal func(args ...interface{}) + Fatalf func(format string, args ...interface{}) + Fatalln func(args ...interface{}) + Info func(args ...interface{}) + Infof func(format string, args ...interface{}) + Infoln func(args ...interface{}) + Panic func(args ...interface{}) + Panicf func(format string, args ...interface{}) + Panicln func(args ...interface{}) + Print func(args ...interface{}) + Printf func(format string, args ...interface{}) + Println func(args ...interface{}) + Warn func(args ...interface{}) + Warnf func(format string, args ...interface{}) + Warning func(args ...interface{}) + Warningf func(format string, args ...interface{}) + Warningln func(args ...interface{}) + Warnln func(args ...interface{}) + WithError func(err error) *Entry + WithField func(key string, value interface{}) *Entry + WithFields func(fields Fields) *Entry + type FieldMap map[fieldKey]string + type Fields map[string]interface + type Formatter interface + Format func(*Entry) ([]byte, error) + type Hook interface + Fire func(*Entry) error + Levels func() []Level + type JSONFormatter struct + DataKey string + DisableTimestamp bool + FieldMap FieldMap + TimestampFormat string + func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) + type Level uint32 + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const PanicLevel + const WarnLevel + func GetLevel() Level + func ParseLevel(lvl string) (Level, error) + func (level Level) String() string + type LevelHooks map[Level][]Hook + func (hooks LevelHooks) Add(hook Hook) + func (hooks LevelHooks) Fire(level Level, entry *Entry) error + type Logger struct + Formatter Formatter + Hooks LevelHooks + Level Level + Out io.Writer + func New() *Logger + func StandardLogger() *Logger + func (logger *Logger) AddHook(hook Hook) + func (logger *Logger) Debug(args ...interface{}) + func (logger *Logger) Debugf(format string, args ...interface{}) + func (logger *Logger) Debugln(args ...interface{}) + func (logger *Logger) Error(args ...interface{}) + func (logger *Logger) Errorf(format string, args ...interface{}) + func (logger *Logger) Errorln(args ...interface{}) + func (logger *Logger) Fatal(args ...interface{}) + func (logger *Logger) Fatalf(format string, args ...interface{}) + func (logger *Logger) Fatalln(args ...interface{}) + func (logger *Logger) Info(args ...interface{}) + func (logger *Logger) Infof(format string, args ...interface{}) + func (logger *Logger) Infoln(args ...interface{}) + func (logger *Logger) Panic(args ...interface{}) + func (logger *Logger) Panicf(format string, args ...interface{}) + func (logger *Logger) Panicln(args ...interface{}) + func (logger *Logger) Print(args ...interface{}) + func (logger *Logger) Printf(format string, args ...interface{}) + func (logger *Logger) Println(args ...interface{}) + func (logger *Logger) SetLevel(level Level) + func (logger *Logger) SetNoLock() + func (logger *Logger) SetOutput(out io.Writer) + func (logger *Logger) Warn(args ...interface{}) + func (logger *Logger) Warnf(format string, args ...interface{}) + func (logger *Logger) Warning(args ...interface{}) + func (logger *Logger) Warningf(format string, args ...interface{}) + func (logger *Logger) Warningln(args ...interface{}) + func (logger *Logger) Warnln(args ...interface{}) + func (logger *Logger) WithError(err error) *Entry + func (logger *Logger) WithField(key string, value interface{}) *Entry + func (logger *Logger) WithFields(fields Fields) *Entry + func (logger *Logger) WithTime(t time.Time) *Entry + func (logger *Logger) Writer() *io.PipeWriter + func (logger *Logger) WriterLevel(level Level) *io.PipeWriter + type MutexWrap struct + func (mw *MutexWrap) Disable() + func (mw *MutexWrap) Lock() + func (mw *MutexWrap) Unlock() + type StdLogger interface + Fatal func(...interface{}) + Fatalf func(string, ...interface{}) + Fatalln func(...interface{}) + Panic func(...interface{}) + Panicf func(string, ...interface{}) + Panicln func(...interface{}) + Print func(...interface{}) + Printf func(string, ...interface{}) + Println func(...interface{}) + type Termios unix.Termios — darwin/amd64, linux/amd64 + type TextFormatter struct + DisableColors bool + DisableLevelTruncation bool + DisableSorting bool + DisableTimestamp bool + FieldMap FieldMap + ForceColors bool + FullTimestamp bool + QuoteEmptyFields bool + TimestampFormat string + func (f *TextFormatter) Format(entry *Entry) ([]byte, error)