Versions in this module Expand all Collapse all v1 v1.0.1 Dec 4, 2023 Changes in this version + const FieldTraceId + func Debug(args ...interface{}) + func Debugf(format string, args ...interface{}) + func Error(args ...interface{}) + func Errorf(format string, args ...interface{}) + func GetTraceCtx(ctx context.Context, args ...string) context.Context + func GetTraceId(ctx context.Context) string + func Info(args ...interface{}) + func Infof(format string, args ...interface{}) + func Trace(args ...interface{}) + func Tracef(format string, args ...interface{}) + func Warn(args ...interface{}) + func Warnf(format string, args ...interface{}) + func Writer() io.Writer + type Config struct + Filepath string + Formatter Formatter + Level Level + Stdout bool + Type Type + type CtxTraceKey struct + type Fields map[string]interface + type Formatter string + const FormatterJSON + const FormatterText + type Level string + const LevelDebug + const LevelError + const LevelFatal + const LevelInfo + const LevelPanic + const LevelTrace + const LevelWarn + type Logger interface + Ctx func(ctx context.Context) Logger + Debug func(args ...interface{}) + Debugf func(format string, args ...interface{}) + Error func(args ...interface{}) + Errorf func(format string, args ...interface{}) + Field func(key string, value interface{}) Logger + Info func(args ...interface{}) + Infof func(format string, args ...interface{}) + Log func(level Level, args ...interface{}) + Logf func(level Level, format string, args ...interface{}) + Trace func(args ...interface{}) + Tracef func(format string, args ...interface{}) + Warn func(args ...interface{}) + Warnf func(format string, args ...interface{}) + Writer func() io.Writer + func Ctx(ctx context.Context) Logger + func Field(key string, value interface{}) Logger + func NewLogger(options ...Option) Logger + type Option func(*Config) + func WithFile(filepath string) Option + func WithFormatter(formatter Formatter) Option + func WithLevel(level Level) Option + func WithLogrus() Option + func WithStdout(v bool) Option + func WithZap() Option + type Type int + const TypeLogrus + const TypeZap