Documentation
¶
Overview ¶
Package log 提供全局日志功能,支持 ctx 注入 request_id
Index ¶
- func Ctx(ctx context.Context) *zap.Logger
- func Debug(msg string, fields ...zap.Field)
- func DebugCtx(ctx context.Context, msg string, fields ...zap.Field)
- func Error(msg string, fields ...zap.Field)
- func ErrorCtx(ctx context.Context, msg string, fields ...zap.Field)
- func Fatal(msg string, fields ...zap.Field)
- func GetRequestID(ctx context.Context) string
- func Info(msg string, fields ...zap.Field)
- func InfoCtx(ctx context.Context, msg string, fields ...zap.Field)
- func Init(cfg Config) error
- func L() *zap.Logger
- func S() *zap.SugaredLogger
- func Sync() error
- func Warn(msg string, fields ...zap.Field)
- func WarnCtx(ctx context.Context, msg string, fields ...zap.Field)
- func WithContext(ctx context.Context, logger *zap.Logger) context.Context
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.