diff --git a/backend/configs/log.go b/backend/configs/log.go index cbbbc47c0..8fe60a91d 100644 --- a/backend/configs/log.go +++ b/backend/configs/log.go @@ -5,5 +5,5 @@ type LogConfig struct { TimeZone string `mapstructure:"timeZone"` LogName string `mapstructure:"log_name"` LogSuffix string `mapstructure:"log_suffix"` - LogBackup int `mapstructure:"log_backup"` + MaxBackup int `mapstructure:"max_backup"` } diff --git a/backend/init/log/log.go b/backend/init/log/log.go index 496925361..f04f4a4b5 100644 --- a/backend/init/log/log.go +++ b/backend/init/log/log.go @@ -33,7 +33,7 @@ func setOutput(logger *logrus.Logger, config configs.LogConfig) { LogPath: global.CONF.System.LogPath, FileName: config.LogName, TimeTagFormat: FileTImeFormat, - MaxRemain: config.LogBackup, + MaxRemain: config.MaxBackup, RollingTimePattern: RollingTimePattern, LogSuffix: config.LogSuffix, }) diff --git a/cmd/server/conf/app.yaml b/cmd/server/conf/app.yaml index 33e4ce156..228bf4248 100644 --- a/cmd/server/conf/app.yaml +++ b/cmd/server/conf/app.yaml @@ -10,4 +10,4 @@ log: time_zone: Asia/Shanghai log_name: 1Panel log_suffix: .log - log_backup: 10 + max_backup: 10