Skip to content

Commit

Permalink
file logger fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iesreza committed Dec 17, 2024
1 parent 964a871 commit 17aa838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/log/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (f *fileLogger) writeLog(entry *log.Entry) {
// startLogRotation rotates the log at midnight
func (f *fileLogger) startLogRotation() {
for {
nextMidnight := time.Now().Truncate(60 * time.Second).Add(60 * time.Second)
nextMidnight := time.Now().Truncate(24 * time.Hour).Add(24 * time.Hour)
time.Sleep(time.Until(nextMidnight))
f.rotateLog()
}
Expand Down

0 comments on commit 17aa838

Please sign in to comment.