Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Duration ¶
func (*Duration) UnmarshalJSON ¶
type FileConfig ¶
type FileConfig struct { // LogDir absolute dir path LogDir string `json:"log_dir"` // FileName such as access.log etc. FileName string `json:"filename"` // Suffix if set "%Y%m%d%H%M"(year month day hour minute), the rotated file // will be named as "filename.201912141922". Suffix string `json:"suffix"` // RotatePeriod time period to rotate the file RotatePeriod Duration `json:"rotate_duration,omitempty"` // RetainMaxAge, this will purge old files those whom exceeds this duration RetainMaxAge Duration `json:"retain_age,omitempty"` // SoftLink if set softlink to current log file, so you can always tail the same file SoftLink bool `json:"soft_link"` // Level, set log level Level LogLevel `json:"level"` // Caller, set if log caller info Caller bool `json:"caller"` // EncodeCfg, ignore this if you don't know about it. This lib provides a default config that may meet most // users' requirement EncodeCfg *zapcore.EncoderConfig }
Click to show internal directories.
Click to hide internal directories.