update at 2019-11-11 09:32:36 by ehlxr
This commit is contained in:
parent
a2a63aebee
commit
119fee49af
2
log.go
2
log.go
@ -242,7 +242,7 @@ func (lc *logConfig) fileWriteSyncer(fileName string) zapcore.WriteSyncer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Rotating log files daily
|
// Rotating log files daily
|
||||||
runner := cron.New(cron.WithSeconds(), cron.WithLocation(time.UTC))
|
runner := cron.New(cron.WithSeconds(), cron.WithLocation(time.Local))
|
||||||
_, _ = runner.AddFunc("0 0 0 * * ?", func() {
|
_, _ = runner.AddFunc("0 0 0 * * ?", func() {
|
||||||
_ = writer.Rotate(time.Now().AddDate(0, 0, -1))
|
_ = writer.Rotate(time.Now().AddDate(0, 0, -1))
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user