Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Filename: "/tmp/app.log", MaxSize: 128, MaxBackups: 10, MaxAge: 180, Compress: true, }
Functions ¶
func GetLogLevel ¶
Types ¶
type Config ¶
type Config struct { Filename string `json:"filename" yaml:"filename"` //日志文件路径 MaxSize int `json:"max_size" yaml:"max_size"` //每个日志文件保存的最大尺寸 单位:M MaxBackups int `json:"max_backups" yaml:"max_backups"` //日志文件最多保存多少个备份 MaxAge int `json:"max_age" yaml:"max_age"` //文件最多保存多少天 Compress bool `json:"compress" yaml:"compress"` //是否压缩 }
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
lumberjack
Package lumberjack provides a rolling logger.
|
Package lumberjack provides a rolling logger. |
Click to show internal directories.
Click to hide internal directories.