Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Error 错误. Error = doError // Warn 警告. Warn = doWarn // Info 提示. Info = doInfo // Debug 调试. Debug = doDebug )
nolint: gochecknoglobals
View Source
var BaseLogger = &baseLogger{ deb: log.New(os.Stderr, "DEBUG: ", flag), inf: log.New(os.Stderr, "INFO: ", flag), war: log.New(os.Stderr, "WARN: ", flag), err: log.New(os.Stderr, "ERROR: ", flag), }
BaseLogger 基础日志. nolint: gochecknoglobals
Functions ¶
Types ¶
type Logger ¶
type Logger interface { // Error 错误. Error(...interface{}) // Warn 警告. Warn(...interface{}) // Info 提示. Info(...interface{}) // Debug 调试. Debug(...interface{}) // SetFlags 设置标记. SetFlags(int) // 关闭. Close() }
Logger 日志器.
func FileLogger ¶
FileLogger 新建文件日志. file 默认日志, error 日志, warn 日志, info 日志.
Click to show internal directories.
Click to hide internal directories.