rotate 수정

main
JungJun 2 years ago
parent 06ab81c0e4
commit fce9d18efb

@ -123,7 +123,15 @@ func NewIcsLog(conf *icsconf.LogConfig, level int, output int, path string, disk
// gIcsLog.logger = log.New(&gIcsLog.buf, "", log.Ldate|log.Ltime|log.Lmicroseconds|log.Lshortfile)
gIcsLog.logger = log.New(&gIcsLog.buf, "", 0)
gIcsLog.CurrentDate = time.Now()
// 5분 연산
now := time.Now()
nowMin := now.Minute()
nowMinRem := nowMin % 5
nowMinS := fmt.Sprintf("%02dm", nowMinRem)
convMinutes, _ := time.ParseDuration(nowMinS)
diffMinutes := now.Add(-convMinutes)
gIcsLog.CurrentDate = diffMinutes
gIcsLog.DelDay = conf.DelConfig.DelDay
gIcsLog.DelHour = conf.DelConfig.DelHour

Loading…
Cancel
Save