Documentation ¶
Index ¶
- func RegisterLog(fun RegisterLogFunc)
- func SetLevel(level Level)
- func SetLogPath(filepath string, level ...Level)
- func Trace(format string, args ...interface{})
- func TraceCaller(format string, args ...interface{})
- func WriteLog(log Logger, level Level, format string, args ...interface{})
- type Level
- type LogFiles
- func (lf *LogFiles) Alert(filename, format string, args ...interface{})
- func (lf *LogFiles) Critical(filename, format string, args ...interface{})
- func (lf *LogFiles) Debug(filename, format string, args ...interface{})
- func (lf *LogFiles) Emergency(filename, format string, args ...interface{})
- func (lf *LogFiles) Error(filename, format string, args ...interface{})
- func (lf *LogFiles) GetLog(filename string) Logger
- func (lf *LogFiles) Info(filename, format string, args ...interface{})
- func (lf *LogFiles) Level(level Level)
- func (lf *LogFiles) Notice(filename, format string, args ...interface{})
- func (lf *LogFiles) Warning(filename, format string, args ...interface{})
- type Logger
- type RegisterLogFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterLog ¶
func RegisterLog(fun RegisterLogFunc)
Types ¶
type LogFiles ¶
type LogFiles struct {
// contains filtered or unexported fields
}
func NewLogFiles ¶
初始化一个日志集合,filepath日志保存路径,如果为空直接输出到屏幕 t日志文件分割时间,比如每天一个文件或每小时一个文件等
type Logger ¶
type Logger interface { io.Writer //输出 Debug(format string, args ...interface{}) //输出 Info(format string, args ...interface{}) //警告 Warning(format string, args ...interface{}) //注意 Notice(format string, args ...interface{}) //错误 Error(format string, args ...interface{}) //关键 Critical(format string, args ...interface{}) //警报 Alert(format string, args ...interface{}) //紧急 Emergency(format string, args ...interface{}) }
Logger 日志接口
Click to show internal directories.
Click to hide internal directories.