Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogMsg ¶
type LogMsg struct {
Time time.Time // 产生时间
LineCode string // 产生日志的代码行
Level LogLevel // 日志级别
Format string // 格式化文本
Args []interface{} // 格式化参数
Config *_Config // 日志配置
}
日志消息体
type Logger ¶
type Logger interface {
Trace(format string, args ...interface{})
Debug(format string, args ...interface{})
Info(format string, args ...interface{})
Warn(format string, args ...interface{})
Error(format string, args ...interface{})
Fatal(format string, args ...interface{})
AddLogMsgHook(hook LogMsgHook)
Exit(code int)
AddLogExitHook(hook LogExitHook)
}
日志API
Click to show internal directories.
Click to hide internal directories.