From 24ce17cbeada909dbb70a1a59880822a1d5f672b Mon Sep 17 00:00:00 2001 From: Wangjunqi123 Date: Mon, 22 Jul 2024 16:46:44 +0800 Subject: [PATCH] server: modify logs of configuration file read exception --- elk.yaml.template | 1 + server/conf/config.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elk.yaml.template b/elk.yaml.template index c18d341..279efc6 100644 --- a/elk.yaml.template +++ b/elk.yaml.template @@ -1,3 +1,4 @@ +# 插件默认配置文件搜索路径: /opt/PilotGo/plugin/elk/elk.yaml ,可在运行可执行文件时用 -conf 指定配置文件目录 #------------------------------- elk server ------------------------------- elk: # diff --git a/server/conf/config.go b/server/conf/config.go index b80dbc9..9128250 100644 --- a/server/conf/config.go +++ b/server/conf/config.go @@ -42,8 +42,7 @@ func InitConfig() { bytes, err := global.FileReadBytes(ConfigFile()) if err != nil { flag.Usage() - err = errors.Wrapf(err, "open file failed: %s, %s", ConfigFile(), err.Error()) // err top - fmt.Printf("%+v\n", err) + fmt.Printf("%s\n", err.Error()) os.Exit(1) } -- Gitee