Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefault ¶
func NewZeroLogger ¶
func SetDefault ¶
func SetDefault(conf *Config)
Types ¶
type Config ¶
type Config struct {
Level string `yaml:"level"` // 日志级别,支持 debug info warn error 默认info
Filename string `yaml:"filename"` // 日志文件名,若文件名为空,则会将日志打印至stdout
MaxAge int `yaml:"max_age"` // 日志文件最大保存天数,默认为30
ConsoleFmt bool `yaml:"console_fmt"` // 若此选项为true,打印至stdout时将使用终端格式打印
ConsoleColor bool `yaml:"console_color"` // 终端打印日志时是否包含颜色
}
Click to show internal directories.
Click to hide internal directories.