Documentation ¶
Overview ¶
Package logger 对zap做了一层简单的包装,提供了基本的重定向到日志,常用的函数封装等 TODO:
Index ¶
- func Debug(msg string, fields ...zapcore.Field)
- func Debugf(template string, args ...interface{})
- func Debugw(msg string, keyAndValues ...interface{})
- func Duration(key string, duration time.Duration) zap.Field
- func Err(err error) zap.Field
- func Error(msg string, fields ...zapcore.Field)
- func Errorf(template string, args ...interface{})
- func Errorw(msg string, keyAndValues ...interface{})
- func Fatal(msg string, fields ...zapcore.Field)
- func Info(msg string, fields ...zapcore.Field)
- func Infof(template string, args ...interface{})
- func Infow(msg string, keyAndValues ...interface{})
- func Init(ctx context.Context, debug bool, opt Option) error
- func InitDebug()
- func Int(k string, v int) zap.Field
- func Logger() *zap.Logger
- func RequestID(ctx context.Context) zap.Field
- func String(k, v string) zap.Field
- func Sugar() *zap.SugaredLogger
- func Warn(msg string, fields ...zapcore.Field)
- func Warnw(msg string, keyAndValues ...interface{})
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.