Documentation
¶
Index ¶
Constants ¶
View Source
const ( // RollNon 日志文件不轮转 RollNon int = 0 // RollBySize 按大小轮转 RollBySize int = 1 // RollByTime 按时间轮转 RollByTime int = 2 )
Variables ¶
Functions ¶
Types ¶
type Conf ¶ added in v1.0.1
type Conf struct { // 文件路径 如: C:\\log FilePath string `json:"filePath"` // 命名日期时间格式:yyyyMMddHHmmss TimePatten string // 文件名 如:system.log FileName string `json:"fileName"` // 保留天数,超过后自动清除 RemainDay int `json:"remainDay"` // 文件滚动策略,按大小,按时间等等 // RollPolicy 策略支持 RollNon, RollBySize, RollByTime // RollTime 滚动的时间间隔,单位秒 // RollSize 滚动的文件大小,单位Byte RollPolicy int `json:"rollPolicy"` RollTime int64 `json:"rollTime"` RollSize int64 `json:"rollSize"` // 是否压缩 Compress bool `json:"compress"` }
Conf 是 Gwriter 的配置文件
Click to show internal directories.
Click to hide internal directories.