diff --git a/routers/private/manager.go b/routers/private/manager.go index 26096c403..397e6fac7 100644 --- a/routers/private/manager.go +++ b/routers/private/manager.go @@ -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