Versions in this module Expand all Collapse all v2 v2.2.1 Apr 12, 2022 Changes in this version + const LevelKey + var DefaultCaller = Caller(defaultDepth) + var DefaultMessageKey = "msg" + var DefaultTimestamp = Timestamp(time.RFC3339) + func Debug(a ...interface{}) + func Debugf(format string, a ...interface{}) + func Debugw(keyvals ...interface{}) + func Error(a ...interface{}) + func Errorf(format string, a ...interface{}) + func Errorw(keyvals ...interface{}) + func Fatal(a ...interface{}) + func Fatalf(format string, a ...interface{}) + func Fatalw(keyvals ...interface{}) + func Info(a ...interface{}) + func Infof(format string, a ...interface{}) + func Infow(keyvals ...interface{}) + func Log(level Level, keyvals ...interface{}) + func SetLogger(logger Logger) + func Value(ctx context.Context, v interface{}) interface + func Warn(a ...interface{}) + func Warnf(format string, a ...interface{}) + func Warnw(keyvals ...interface{}) + type Filter struct + func NewFilter(logger Logger, opts ...FilterOption) *Filter + func (f *Filter) Log(level Level, keyvals ...interface{}) error + type FilterOption func(*Filter) + func FilterFunc(f func(level Level, keyvals ...interface{}) bool) FilterOption + func FilterKey(key ...string) FilterOption + func FilterLevel(level Level) FilterOption + func FilterValue(value ...string) FilterOption + type Helper struct + func NewHelper(logger Logger, opts ...Option) *Helper + func (h *Helper) Debug(a ...interface{}) + func (h *Helper) Debugf(format string, a ...interface{}) + func (h *Helper) Debugw(keyvals ...interface{}) + func (h *Helper) Error(a ...interface{}) + func (h *Helper) Errorf(format string, a ...interface{}) + func (h *Helper) Errorw(keyvals ...interface{}) + func (h *Helper) Fatal(a ...interface{}) + func (h *Helper) Fatalf(format string, a ...interface{}) + func (h *Helper) Fatalw(keyvals ...interface{}) + func (h *Helper) Info(a ...interface{}) + func (h *Helper) Infof(format string, a ...interface{}) + func (h *Helper) Infow(keyvals ...interface{}) + func (h *Helper) Log(level Level, keyvals ...interface{}) + func (h *Helper) Warn(a ...interface{}) + func (h *Helper) Warnf(format string, a ...interface{}) + func (h *Helper) Warnw(keyvals ...interface{}) + func (h *Helper) WithContext(ctx context.Context) *Helper + type Level int8 + const LevelDebug + const LevelError + const LevelFatal + const LevelInfo + const LevelWarn + func ParseLevel(s string) Level + func (l Level) String() string + type Logger interface + Log func(level Level, keyvals ...interface{}) error + var DefaultLogger Logger = NewStdLogger(log.Writer()) + func GetLogger() Logger + func MultiLogger(logs ...Logger) Logger + func NewStdLogger(w io.Writer) Logger + func With(l Logger, kv ...interface{}) Logger + func WithContext(ctx context.Context, l Logger) Logger + type Option func(*Helper) + func WithMessageKey(k string) Option + type Valuer func(ctx context.Context) interface + func Caller(depth int) Valuer + func Timestamp(layout string) Valuer