25 lines
489 B
Go
25 lines
489 B
Go
package config
|
|
|
|
// LogConf : config for logging
|
|
type LogConf struct {
|
|
Level string `yaml:"level"`
|
|
FileName string `yaml:"filename"`
|
|
Format string `yaml:"format"`
|
|
Stdout bool `yaml:"stdout"`
|
|
MaxSize int `yaml:"max_size"`
|
|
MaxNum int `yaml:"max_num"`
|
|
}
|
|
|
|
// NewLogConf with default value
|
|
func NewLogConf() *LogConf {
|
|
// only for development
|
|
return &LogConf{
|
|
Level: "info",
|
|
FileName: "",
|
|
Format: "text",
|
|
Stdout: true,
|
|
MaxSize: 0,
|
|
MaxNum: 0,
|
|
}
|
|
}
|