Documentation
¶
Index ¶
- Variables
- func DebugContext(ctx context.Context, args ...interface{})
- func DebugContextf(ctx context.Context, format string, args ...interface{})
- func Debugf(format string, args ...interface{})
- func ErrorContext(ctx context.Context, args ...interface{})
- func ErrorContextf(ctx context.Context, format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func InfoContext(ctx context.Context, args ...interface{})
- func InfoContextf(ctx context.Context, format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func NewSugarLogger(options Options) *zapLoggerWrapper
- func WarnContext(ctx context.Context, args ...interface{})
- func WarnContextf(ctx context.Context, format string, args ...interface{})
- func Warnf(format string, args ...interface{})
- type Logger
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var Levels = map[string]zapcore.Level{ "": zapcore.DebugLevel, "debug": zapcore.DebugLevel, "info": zapcore.InfoLevel, "warn": zapcore.WarnLevel, "error": zapcore.ErrorLevel, "fatal": zapcore.FatalLevel, }
Levels zapcore level
Functions ¶
func DebugContext ¶
DebugContext 打印 Debug 日志
func DebugContextf ¶
DebugContextf 打印 Debug 日志
func ErrorContext ¶
ErrorContext 打印 Error 日志
func ErrorContextf ¶
func InfoContext ¶
InfoContext 打印 Info 日志
func InfoContextf ¶
InfoContextf 打印 Info 日志
func NewSugarLogger ¶
func NewSugarLogger(options Options) *zapLoggerWrapper
func WarnContext ¶
WarnContext 打印 Warn 日志
func WarnContextf ¶
WarnContextf 打印 Warn 日志
Types ¶
type Logger ¶
type Logger interface { Error(v ...interface{}) Warn(v ...interface{}) Info(v ...interface{}) Debug(v ...interface{}) Errorf(format string, v ...interface{}) Warnf(format string, v ...interface{}) Infof(format string, v ...interface{}) Debugf(format string, v ...interface{}) }
func GetDefaultLogger ¶
func GetDefaultLogger() Logger
Click to show internal directories.
Click to hide internal directories.