Versions in this module Expand all Collapse all v0 v0.9.1 Jan 22, 2019 Changes in this version + const DebugLevel + const ErrorLevel + const InfoLevel + const MinLevel + const OffLevel + func InitLog(path string) + func SetOptions(opts ...optionFn) + func Unsubscribe(sub *Subscription) + func WithEventSubscriber(fn func(evt Event)) optionFn + type Encoder interface + EncodeBool func(key string, val bool) + EncodeDuration func(key string, val time.Duration) + EncodeFloat64 func(key string, val float64) + EncodeInt func(key string, val int) + EncodeInt64 func(key string, val int64) + EncodeObject func(key string, val interface{}) + EncodeString func(key string, val string) + EncodeType func(key string, val reflect.Type) + EncodeUint func(key string, val uint) + EncodeUint64 func(key string, val uint64) + type Event struct + Context []Field + Fields []Field + Level Level + Message string + Prefix string + Time time.Time + type Field struct + func Bool(key string, val bool) Field + func Duration(key string, val time.Duration) Field + func Error(err error) Field + func Float64(key string, val float64) Field + func Int(key string, val int) Field + func Int64(key string, val int64) Field + func Message(val interface{}) Field + func Object(key string, val interface{}) Field + func Stack() Field + func String(key string, val string) Field + func Stringer(key string, val fmt.Stringer) Field + func Time(key string, val time.Time) Field + func TypeOf(key string, val interface{}) Field + func Uint(key string, val uint) Field + func Uint64(key string, val uint64) Field + func (f Field) Encode(enc Encoder) + type Level int32 + type Logger struct + func New(level Level, prefix string, context ...Field) *Logger + func (l *Logger) Debug(msg string, fields ...Field) + func (l *Logger) Error(msg string, fields ...Field) + func (l *Logger) Info(msg string, fields ...Field) + func (l *Logger) Level() Level + func (l *Logger) SetLevel(level Level) + func (l *Logger) With(fields ...Field) *Logger + type Subscription struct + func Subscribe(fn func(evt Event)) *Subscription + func (s *Subscription) WithMinLevel(level Level) *Subscription