NewRotateFile 问题, 无论什么选项都是返回Every Second。
inhere opened this issue · 2 comments
inhere commented
NewRotateFile 问题, 无论什么选项都是返回Every Second。
// GetIntervalAndFormat get check interval time and log suffix format
func (rt rotateTime) GetIntervalAndFormat() (checkInterval int64, suffixFormat string) {
switch rt {
case EveryDay:
checkInterval = 3600 * 24
suffixFormat = "20060102"
case EveryHour:
checkInterval = 3600
suffixFormat = "20060102_1500"
case Every30Minutes:
checkInterval = 1800
suffixFormat = "20060102_1504"
case Every15Minutes:
checkInterval = 900
suffixFormat = "20060102_1504"
case EveryMinute:
checkInterval = 60
suffixFormat = "20060102_1504"
}
// Every Second
return 1, "20060102_150405"
}
Originally posted by @lkeme in #31 (comment)
lkeme commented
OK