forked from qinguoyi/osproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog.go
15 lines (14 loc) · 845 Bytes
/
log.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package config
// Log 日志配置
type Log struct {
Level string `mapstructure:"level" json:"level" yaml:"level"`
RootDir string `mapstructure:"root_dir" json:"root_dir" yaml:"root_dir"`
Filename string `mapstructure:"filename" json:"filename" yaml:"filename"`
Format string `mapstructure:"format" json:"format" yaml:"format"`
ShowLine bool `mapstructure:"show_line" json:"show_line" yaml:"show_line"`
MaxBackups int `mapstructure:"max_backups" json:"max_backups" yaml:"max_backups"`
MaxSize int `mapstructure:"max_size" json:"max_size" yaml:"max_size"` // MB
MaxAge int `mapstructure:"max_age" json:"max_age" yaml:"max_age"` // day
Compress bool `mapstructure:"compress" json:"compress" yaml:"compress"`
EnableFile bool `mapstructure:"enable_file" json:"enable_file" yaml:"enable_file"`
}