Documentation ¶
Index ¶
- Variables
- func New(loger *zap.Logger, conf *logger.Config) logger.Interface
- func SetTranceId(ctx context.Context, traceId string) context.Context
- func TraceId(ctx context.Context) string
- type Config
- type Logger
- func (l *Logger) Error(ctx context.Context, msg string, data ...interface{})
- func (l *Logger) Info(ctx context.Context, msg string, data ...interface{})
- func (l *Logger) LogMode(level logger.LogLevel) logger.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *Logger) Warn(ctx context.Context, msg string, data ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultV2 = New(logi.GetNoCallerLogger().Logger, &logger.Config{ SlowThreshold: 100 * time.Millisecond, LogLevel: logger.Warn, Colorful: true, }) )
Functions ¶
func SetTranceId ¶ added in v0.0.40
Types ¶
Click to show internal directories.
Click to hide internal directories.