mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
feat: 修改 app.yaml 中日志备份数量参数
This commit is contained in:
parent
388c6150c7
commit
1ef26aa4eb
@ -5,5 +5,5 @@ type LogConfig struct {
|
|||||||
TimeZone string `mapstructure:"timeZone"`
|
TimeZone string `mapstructure:"timeZone"`
|
||||||
LogName string `mapstructure:"log_name"`
|
LogName string `mapstructure:"log_name"`
|
||||||
LogSuffix string `mapstructure:"log_suffix"`
|
LogSuffix string `mapstructure:"log_suffix"`
|
||||||
LogBackup int `mapstructure:"log_backup"`
|
MaxBackup int `mapstructure:"max_backup"`
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ func setOutput(logger *logrus.Logger, config configs.LogConfig) {
|
|||||||
LogPath: global.CONF.System.LogPath,
|
LogPath: global.CONF.System.LogPath,
|
||||||
FileName: config.LogName,
|
FileName: config.LogName,
|
||||||
TimeTagFormat: FileTImeFormat,
|
TimeTagFormat: FileTImeFormat,
|
||||||
MaxRemain: config.LogBackup,
|
MaxRemain: config.MaxBackup,
|
||||||
RollingTimePattern: RollingTimePattern,
|
RollingTimePattern: RollingTimePattern,
|
||||||
LogSuffix: config.LogSuffix,
|
LogSuffix: config.LogSuffix,
|
||||||
})
|
})
|
||||||
|
@ -10,4 +10,4 @@ log:
|
|||||||
time_zone: Asia/Shanghai
|
time_zone: Asia/Shanghai
|
||||||
log_name: 1Panel
|
log_name: 1Panel
|
||||||
log_suffix: .log
|
log_suffix: .log
|
||||||
log_backup: 10
|
max_backup: 10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user