Documentation ¶
Index ¶
Constants ¶
View Source
const ( ZapDrive = "zap" ZapStdDrive = "zapStd" )
Variables ¶
This section is empty.
Functions ¶
func NewZapLogger ¶
func NewZapLogger(cfg *Config) (*zap.SugaredLogger, error)
func NewZapSTDLogger ¶
func NewZapSTDLogger(cfg *Config) (*zap.SugaredLogger, error)
Types ¶
type Config ¶
type Config struct { Drive string `yaml:"drive"` // 驱动 Path string `yaml:"path"` // 路径 File string `yaml:"file"` // 文件名 MaxAge time.Duration `yaml:"maxAge"` // 最大保存时间 MaxBackups int `yaml:"maxBackups"` // 最大文件个数 MaxFileSize int `yaml:"maxFileSize"` // 文件大小 Level int8 `yaml:"level"` // 级别 Compress bool `yaml:"compress"` // 是否压缩 LocalTime bool `yaml:"localTime"` // 是否使用当地时间 }
Click to show internal directories.
Click to hide internal directories.