From 18b474ac5f45ea0369db9aea3831cb151b303e44 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Tue, 10 Dec 2024 23:36:28 +0800 Subject: [PATCH] by Robin at 20241210 --- app/mix/service/cronservice.go | 2 +- etc/mix/mix-prod-offline.yaml | 3 ++- etc/mix/mix-prod.yaml | 1 + etc/mix/mix-test-offline.yaml | 1 + etc/mix/mix-test.yaml | 1 + library/configcenter/configcenter.go | 7 ++++--- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/mix/service/cronservice.go b/app/mix/service/cronservice.go index 5119a304..22cc2419 100644 --- a/app/mix/service/cronservice.go +++ b/app/mix/service/cronservice.go @@ -40,7 +40,7 @@ func (s *CronService) Init(c any) (exec xxl.Executor, err error) { return } - s.fileAbsPath = cfg.Log.FileAbsPath + s.fileAbsPath = cfg.Log.BusiFileAbsPath s.serverConnInfos = make([]*ServerConnInfo, 0) ips := strings.Split(cfg.ServerInfo.MainServerIps, " ") ports := strings.Split(cfg.ServerInfo.MainServerPorts, " ") diff --git a/etc/mix/mix-prod-offline.yaml b/etc/mix/mix-prod-offline.yaml index dfd16c9d..f45cc569 100644 --- a/etc/mix/mix-prod-offline.yaml +++ b/etc/mix/mix-prod-offline.yaml @@ -4,6 +4,7 @@ log: file_enable: true file_level: "info" file_abs_path: "/app/ironfan/log/mix-offline/" + busi_file_abs_path: "/app/ironfan/log/mix/" app: app_name: "offline-server" @@ -204,4 +205,4 @@ zthy: username: "XYDLhy" password: "e76f4c5afa1d431b20e8856f6c5a08da" signature: "【铁粉空间】" - tpId: "157478" \ No newline at end of file + tpId: "157478" diff --git a/etc/mix/mix-prod.yaml b/etc/mix/mix-prod.yaml index 55b0ba3e..01788aa4 100644 --- a/etc/mix/mix-prod.yaml +++ b/etc/mix/mix-prod.yaml @@ -4,6 +4,7 @@ log: file_enable: true file_level: "info" file_abs_path: "/app/ironfan/log/mix/" + busi_file_abs_path: "/app/ironfan/log/mix/" app: app_name: "mix" diff --git a/etc/mix/mix-test-offline.yaml b/etc/mix/mix-test-offline.yaml index 340b987e..a86dbf4c 100644 --- a/etc/mix/mix-test-offline.yaml +++ b/etc/mix/mix-test-offline.yaml @@ -4,6 +4,7 @@ log: file_enable: true file_level: "trace" file_abs_path: "/app/ironfan/log/mix-test/" + busi_file_abs_path: "/app/ironfan/log/mix/" app: app_name: "offline-server" diff --git a/etc/mix/mix-test.yaml b/etc/mix/mix-test.yaml index 333945ea..d9ce13f0 100644 --- a/etc/mix/mix-test.yaml +++ b/etc/mix/mix-test.yaml @@ -4,6 +4,7 @@ log: file_enable: true file_level: "trace" file_abs_path: "/app/ironfan/log/mix-test/" + busi_file_abs_path: "/app/ironfan/log/mix/" app: app_name: "mix-test" diff --git a/library/configcenter/configcenter.go b/library/configcenter/configcenter.go index 15a823bb..5e2fba7f 100644 --- a/library/configcenter/configcenter.go +++ b/library/configcenter/configcenter.go @@ -19,9 +19,10 @@ type LoggerConfig struct { StdoutEnable bool `json:"stdout_enable" yaml:"stdout_enable"` // 是否允许控制台输出 StdoutLevel string `json:"stdout_level" yaml:"stdout_level"` // 控制台输出日志等级 - FileEnable bool `json:"file_enable" yaml:"file_enable"` // 是否允许写文件 - FileLevel string `json:"file_level" yaml:"file_level"` // 文件输出日志等级 - FileAbsPath string `json:"file_abs_path" yaml:"file_abs_path"` // 日志文件绝对路径 + FileEnable bool `json:"file_enable" yaml:"file_enable"` // 是否允许写文件 + FileLevel string `json:"file_level" yaml:"file_level"` // 文件输出日志等级 + FileAbsPath string `json:"file_abs_path" yaml:"file_abs_path"` // 日志文件绝对路径 + BusiFileAbsPath string `json:"busi_file_abs_path" yaml:"busi_file_abs_path"` // 业务服务器日志文件绝对路径 } // 服务配置