From 6efe13d142a1373865ad683bf0e4381071e1f4cb Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 5 Apr 2022 16:41:37 +0800 Subject: [PATCH] log --- cmd/open_im_api/main.go | 3 +++ pkg/common/config/config.go | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index ce89a8564..7f1546022 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -10,6 +10,7 @@ import ( "Open_IM/internal/api/office" apiThird "Open_IM/internal/api/third" "Open_IM/internal/api/user" + "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" "Open_IM/pkg/utils" @@ -30,6 +31,8 @@ func main() { r := gin.Default() r.Use(utils.CorsHandler()) + + log.Info("load config: ", config.Config) // user routing group, which handles user registration and login services userRouterGroup := r.Group("/user") { diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 3c597fbbf..8b174f993 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -1,7 +1,6 @@ package config import ( - "fmt" "io/ioutil" "os" "path/filepath" @@ -420,5 +419,4 @@ func init() { if err = yaml.Unmarshal(bytes, &Config); err != nil { panic(err.Error()) } - fmt.Println("load config: ", Config) }