Merge pull request 'main' (#881) from main into test

Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/service/pulls/881
This commit is contained in:
chenhao 2024-12-11 18:21:17 +08:00
commit beccc8b22f
6 changed files with 10 additions and 5 deletions

View File

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

View File

@ -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"
tpId: "157478"

View File

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

View File

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

View File

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

View File

@ -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"` // 业务服务器日志文件绝对路径
}
// 服务配置