Skip to content

Commit

Permalink
Merge pull request #43 from kazeburo/fix-log-max-age
Browse files Browse the repository at this point in the history
Fixed log maxage
  • Loading branch information
kazeburo committed Apr 20, 2020
2 parents bff7525 + 3406765 commit fd79b44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accesslog/accesslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func logWriter(logDir string, logRotate int64, logRotateTime int64) (io.Writer,
rl, err := rotatelogs.New(
logFile,
rotatelogs.WithLinkName(linkName),
rotatelogs.WithMaxAge(time.Duration(logRotate)*86400*time.Second),
rotatelogs.WithMaxAge(time.Duration(logRotate*60*logRotateTime)*time.Second),
rotatelogs.WithRotationTime(time.Second*time.Duration(logRotateTime)*60),
)
if err != nil {
Expand Down

0 comments on commit fd79b44

Please sign in to comment.