Documentation
¶
Index ¶
- func ParseTime() string
- type Config
- type LogLevel
- type Logger
- func (lg *Logger) Close()
- func (lg *Logger) DEBUG(f string, a ...interface{})
- func (lg *Logger) ERROR(f string, a ...interface{})
- func (lg *Logger) FATAL(f string, a ...interface{})
- func (lg *Logger) INFO(f string, a ...interface{})
- func (lg *Logger) LogF(level LogLevel, f string, a ...interface{})
- func (lg *Logger) LogOut(f string, a ...interface{})
- func (lg *Logger) Output(calldepth int, s string) error
- func (lg *Logger) SetLevel(level LogLevel)
- func (lg *Logger) WARN(f string, a ...interface{})
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ContentMaxSize int64 // 单文件最大条数, 第一次切割行数切割,会保留原文件的行数,则文件保存行数为 oldfileSize + ContentMaxSize 默认值 10000
QueueSize int // 内部写入队列大小 默认值 100000
Rotate int // 保留时间范围 Rotate * RotateInterval 默认值 7
RotateInterval time.Duration // 程序启动,切割日志时间间隔 �默认值 24*hour
Prefix string // 日志前缀
FuncCallDepth int // 打印调用方法位置深度 默认 2
}
Config 日志配置
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger 日志写入器
Click to show internal directories.
Click to hide internal directories.