From 1ef26aa4ebfcfa894030ccb1522254efc7695a8f Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Wed, 1 Mar 2023 10:42:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=20app.yaml=20?= =?UTF-8?q?=E4=B8=AD=E6=97=A5=E5=BF=97=E5=A4=87=E4=BB=BD=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/configs/log.go | 2 +- backend/init/log/log.go | 2 +- cmd/server/conf/app.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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