The `rotate` option is optional. Test result: ![image](https://github.com/go-gitea/gitea/assets/2114189/7cff8207-dcf3-4988-adef-247f1c9316e7)tags/v1.20.0-rc0
@@ -155,7 +155,7 @@ func AddLogger(ctx *context.PrivateContext) { | |||
writerOption := log.WriterFileOption{} | |||
fileName, _ := opts.Config["filename"].(string) | |||
writerOption.FileName = setting.LogPrepareFilenameForWriter(fileName, opts.Writer+".log") | |||
writerOption.LogRotate = opts.Config["rotate"].(bool) | |||
writerOption.LogRotate, _ = opts.Config["rotate"].(bool) | |||
maxSizeShift, _ := opts.Config["maxsize"].(int) | |||
if maxSizeShift == 0 { | |||
maxSizeShift = 28 |