mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-24 08:57:03 -05:00
Fix logger refactoring regression: manager logging add (#24847)
The `rotate` option is optional. Test result: ![image](https://github.com/go-gitea/gitea/assets/2114189/7cff8207-dcf3-4988-adef-247f1c9316e7)
This commit is contained in:
parent
21add7ea88
commit
979f08053f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue