Documentation
¶
Index ¶
- type LogLevel
- type Logger
- func (l *Logger) Close()
- func (l *Logger) Debug(f string, a ...interface{})
- func (l *Logger) Error(f string, a ...interface{})
- func (l *Logger) Fatal(f string, a ...interface{})
- func (l *Logger) Info(f string, a ...interface{})
- func (l *Logger) InfoOut() io.Writer
- func (l *Logger) Level() string
- func (l *Logger) Output(calldepth int, s string) error
- func (l *Logger) Prefix() string
- func (l *Logger) Printf(format string, v ...interface{})
- func (l *Logger) Println(v ...interface{})
- func (l *Logger) SetCalldepth(calldepth int)
- func (l *Logger) SetDateFlag(flag byte)
- func (l *Logger) SetLevel(level LogLevel)
- func (l *Logger) SetMonofileMaxRows(rows uint64)
- func (l *Logger) SetPrefix(prefix string)
- func (l *Logger) SetRotate(num int)
- func (l *Logger) SetRotateInterval(interval time.Duration)
- func (l *Logger) Warn(f string, a ...interface{})
- func (l *Logger) WarnOut() io.Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger 日志写入器
func (*Logger) SetCalldepth ¶ added in v1.0.0
SetCalldepth 设置函数调用深度 默认 2
func (*Logger) SetDateFlag ¶ added in v1.0.1
SetDateFlag 设置 date 的间隔标志
func (*Logger) SetMonofileMaxRows ¶ added in v1.0.0
SetMonofileMaxRows 单文件最大条数, 第一次切割行数切割,会保留原文件的行数,则文件保存行数为 oldfileSize + ContentMaxSize 默认值 10000
func (*Logger) SetRotateInterval ¶ added in v1.0.0
SetRotateInterval 初始化日志,切割日志时间间隔 �默认值 24*hour
Click to show internal directories.
Click to hide internal directories.