Documentation ¶
Index ¶
- func Close()
- func Debug(args ...interface{})
- func DebugContext(ctx context.Context, args ...interface{})
- func DebugContextf(ctx context.Context, template string, args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Desugar() *zap.Logger
- func Error(args ...interface{})
- func ErrorContext(ctx context.Context, args ...interface{})
- func ErrorContextf(ctx context.Context, template string, args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(args ...interface{})
- func FatalContext(ctx context.Context, args ...interface{})
- func FatalContextf(ctx context.Context, template string, args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Get(lgr string) *zap.SugaredLogger
- func GetGorm(lgrName string) glogger.Interface
- func Info(args ...interface{})
- func InfoContext(ctx context.Context, args ...interface{})
- func InfoContextf(ctx context.Context, template string, args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func JSON(v interface{}) string
- func LoggerFromContext(ctx context.Context) *zap.SugaredLogger
- func Named(name string) *zap.SugaredLogger
- func NewTencentClsSyncer(cfg config.TencentCLSConfig) (zapcore.WriteSyncer, error)
- func NewWorkwxSyncer(wxKey string) zapcore.WriteSyncer
- func ReloadConfig(module string, cfg config.LogsConfig) error
- func RequestLogger(reqid string) *zap.SugaredLogger
- func SetContextFields(ctx context.Context, fields ...interface{})
- func SetContextLogger(ctx context.Context, l *zap.SugaredLogger)
- func SetLevel(lvl zapcore.Level)
- func Sync() error
- func Warn(args ...interface{})
- func WarnContext(ctx context.Context, args ...interface{})
- func WarnContextf(ctx context.Context, template string, args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- func With(args ...interface{}) *zap.SugaredLogger
- func WithContextFields(ctx context.Context, fields ...interface{}) context.Context
- func WithContextLogger(ctx context.Context, l *zap.SugaredLogger) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugContext ¶ added in v0.1.3
DebugContext 调试
func DebugContextf ¶ added in v0.1.3
DebugContextf 调试
func ErrorContext ¶ added in v0.1.3
ErrorContext 错误信息
func ErrorContextf ¶ added in v0.1.3
ErrorContextf 错误信息
func FatalContext ¶ added in v0.1.3
FatalContext 致命错误
func FatalContextf ¶ added in v0.1.3
FatalContextf 致命错误
func InfoContext ¶ added in v0.1.3
InfoContext 提示信息
func InfoContextf ¶ added in v0.1.3
InfoContextf 提示信息
func LoggerFromContext ¶ added in v0.1.5
func LoggerFromContext(ctx context.Context) *zap.SugaredLogger
LoggerFromContext 获取日志上下文
func NewTencentClsSyncer ¶ added in v0.1.3
func NewTencentClsSyncer(cfg config.TencentCLSConfig) (zapcore.WriteSyncer, error)
NewTencentClsSyncer 阿里云日志服务
func NewWorkwxSyncer ¶
func NewWorkwxSyncer(wxKey string) zapcore.WriteSyncer
NewWorkwxSyncer 企业微信日志
func RequestLogger ¶
func RequestLogger(reqid string) *zap.SugaredLogger
RequestLogger 接口请求日志 需要配置access日志
func SetContextFields ¶ added in v0.1.5
SetContextFields 设置日志上下文
func SetContextLogger ¶ added in v0.1.5
func SetContextLogger(ctx context.Context, l *zap.SugaredLogger)
SetContextLogger 设置日志上下文
func WarnContext ¶ added in v0.1.3
WarnContext 警告信息
func WarnContextf ¶ added in v0.1.3
WarnContextf 警告信息
func With ¶
func With(args ...interface{}) *zap.SugaredLogger
With 设置日志字段, 返回一个新的日志对象,参数为键值对, 如: With("key", "value")
func WithContextFields ¶ added in v0.1.3
WithContextFields 设置日志字段上下文
func WithContextLogger ¶ added in v0.1.3
WithContextLogger 设置日志上下文
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.