Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface {
// Info 打印信息级别日志
Info(msg string, fields ...Field)
// Warn 打印警告级别日志
Warn(msg string, fields ...Field)
// Error 打印错误级别日志
Error(msg string, fields ...Field)
// Debug 打印调试级别日志
Debug(msg string, fields ...Field)
// WithContext 返回带有上下文的日志记录器
WithContext(ctx context.Context) Logger
}
Logger 是日志接口
var DefaultLogger Logger = NewStdLogger()
DefaultLogger 是默认的日志记录器
Click to show internal directories.
Click to hide internal directories.