From 04451d4b2ff4b744f1846621dc5bad5fce6b6118 Mon Sep 17 00:00:00 2001 From: "david.yan" Date: Thu, 27 Mar 2025 03:10:56 +0800 Subject: [PATCH] add conf.PrintInfo --- conf/new.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/new.go b/conf/new.go index ff5e183..bbcb8e6 100644 --- a/conf/new.go +++ b/conf/new.go @@ -29,7 +29,9 @@ func New(srvKey string, cfg any) { // 构造配置文件路径,输出配置文件信息 cfp := fmt.Sprintf("%s_%s.yaml", strings.ToLower(srvKey), env.Runtime.Mode) cfp = filepath.Join(env.Runtime.Prefix, "etc", cfp) + print.Info("[BSM - %s] Config File: %s", srvKey, cfp) + print.Info("[BSM - %s] Check Configure ...", vars.ServiceKey) // 读取配置文件内容 yamlFile, err := os.ReadFile(cfp) @@ -58,6 +60,7 @@ func NotNil(values ...string) { } func PrintInfo(port int) { + print.Success("[BSM - %s] Config Check Success.", vars.ServiceKey) print.Info("[BSM - %s] Service Name: %s", vars.ServiceKey, vars.ServiceKey) print.Info("[BSM - %s] Runtime Mode: %s", vars.ServiceKey, env.Runtime.Mode) print.Info("[BSM - %s] Listen Addr: %s:%d", vars.ServiceKey, utils.GetLocationIP(), port)