1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

feat: 修改 app.yaml 中日志备份数量参数

This commit is contained in:
zhengkunwang223 2023-03-01 10:42:42 +08:00 committed by zhengkunwang223
parent 388c6150c7
commit 1ef26aa4eb
3 changed files with 3 additions and 3 deletions

View File

@ -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"`
}

View File

@ -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,
})

View File

@ -10,4 +10,4 @@ log:
time_zone: Asia/Shanghai
log_name: 1Panel
log_suffix: .log
log_backup: 10
max_backup: 10