Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field interface {
// 布尔
Bool(key string, val bool) Field
// 字节数组
ByteString(key string, val []byte) Field
// 字符串
String(key string, val string) Field
// 整型(int64)
Int64(key string, val int64) Field
// 整型(uint32)
Uint32(key string, val uint32) Field
// 接口
Reflect(key string, val interface{}) Field
// 时长
Duration(key string, val time.Duration) Field
// context
WithContext(context context.Context) Field
}
字段
type ILogger ¶
type ILogger interface {
// 普通信息
Info(msg string, fields ...Field)
// 调试信息
Debug(msg string, fields ...Field)
// 警告信息
Warn(msg string, fields ...Field)
// 错误信息
Error(msg string, fields ...Field)
//
GetFields() Field
}
日志标准
Click to show internal directories.
Click to hide internal directories.