diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index b13fc5d68..fb192cbf7 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -226,7 +226,7 @@ func main() { if config.Config.Api.ListenIP != "" { address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort) } - fmt.Println("start api server, address: ", address, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start api server, address: ", address, "OpenIM version: ", constant.CurrentVersion, "\n") err := r.Run(address) if err != nil { log.Error("", "api run failed ", address, err.Error()) diff --git a/cmd/open_im_cms_api/main.go b/cmd/open_im_cms_api/main.go index 3cc52c75d..94c662b0b 100644 --- a/cmd/open_im_cms_api/main.go +++ b/cmd/open_im_cms_api/main.go @@ -25,6 +25,6 @@ func main() { address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort) } address = config.Config.CmsApi.ListenIP + ":" + strconv.Itoa(*ginPort) - fmt.Println("start cms api server, address: ", address, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start cms api server, address: ", address, "OpenIM version: ", constant.CurrentVersion, "\n") router.Run(address) } diff --git a/cmd/open_im_demo/main.go b/cmd/open_im_demo/main.go index 30dfca176..0e2dbaea6 100644 --- a/cmd/open_im_demo/main.go +++ b/cmd/open_im_demo/main.go @@ -71,7 +71,7 @@ func main() { address = config.Config.Api.ListenIP + ":" + strconv.Itoa(*ginPort) } address = config.Config.CmsApi.ListenIP + ":" + strconv.Itoa(*ginPort) - fmt.Println("start demo api server address: ", address, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start demo api server address: ", address, "OpenIM version: ", constant.CurrentVersion, "\n") go register.OnboardingProcessRoutine() go register.ImportFriendRoutine() err := r.Run(address) diff --git a/cmd/open_im_msg_gateway/main.go b/cmd/open_im_msg_gateway/main.go index f61f105a9..44f55ce19 100644 --- a/cmd/open_im_msg_gateway/main.go +++ b/cmd/open_im_msg_gateway/main.go @@ -21,7 +21,7 @@ func main() { flag.Parse() var wg sync.WaitGroup wg.Add(1) - fmt.Println("start rpc/msg_gateway server, port: ", *rpcPort, *wsPort, *prometheusPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start rpc/msg_gateway server, port: ", *rpcPort, *wsPort, *prometheusPort, "OpenIM version: ", constant.CurrentVersion, "\n") gate.Init(*rpcPort, *wsPort) gate.Run(*prometheusPort) wg.Wait() diff --git a/cmd/open_im_msg_transfer/main.go b/cmd/open_im_msg_transfer/main.go index b7e7cb88f..b11fa5a1a 100644 --- a/cmd/open_im_msg_transfer/main.go +++ b/cmd/open_im_msg_transfer/main.go @@ -17,7 +17,7 @@ func main() { flag.Parse() log.NewPrivateLog(constant.LogFileName) logic.Init() - fmt.Println("start msg_transfer server ", "version: ", constant.CurrentVersion, "\n") + fmt.Println("start msg_transfer server ", "OpenIM version: ", constant.CurrentVersion, "\n") logic.Run(*prometheusPort) wg.Wait() } diff --git a/cmd/open_im_push/main.go b/cmd/open_im_push/main.go index c7b1cfe37..b14581690 100644 --- a/cmd/open_im_push/main.go +++ b/cmd/open_im_push/main.go @@ -18,7 +18,7 @@ func main() { var wg sync.WaitGroup wg.Add(1) log.NewPrivateLog(constant.LogFileName) - fmt.Println("start push rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start push rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") logic.Init(*rpcPort) logic.Run(*prometheusPort) wg.Wait() diff --git a/cmd/rpc/open_im_admin_cms/main.go b/cmd/rpc/open_im_admin_cms/main.go index 22f775939..f35b71300 100644 --- a/cmd/rpc/open_im_admin_cms/main.go +++ b/cmd/rpc/open_im_admin_cms/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.AdminCmsPrometheusPort[0], "adminCMSPrometheusPort default listen port") flag.Parse() - fmt.Println("start cms rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start cms rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := rpcMessageCMS.NewAdminCMSServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_auth/main.go b/cmd/rpc/open_im_auth/main.go index 0255516b5..56f2df0df 100644 --- a/cmd/rpc/open_im_auth/main.go +++ b/cmd/rpc/open_im_auth/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "RpcToken default listen port 10800") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.AuthPrometheusPort[0], "authPrometheusPort default listen port") flag.Parse() - fmt.Println("start auth rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start auth rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := rpcAuth.NewRpcAuthServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_cache/main.go b/cmd/rpc/open_im_cache/main.go index c685a0a2c..7df5d80f7 100644 --- a/cmd/rpc/open_im_cache/main.go +++ b/cmd/rpc/open_im_cache/main.go @@ -15,7 +15,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "RpcToken default listen port 10800") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.CachePrometheusPort[0], "cachePrometheusPort default listen port") flag.Parse() - fmt.Println("start cache rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start cache rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := rpcCache.NewCacheServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_conversation/main.go b/cmd/rpc/open_im_conversation/main.go index 3f3e3fdcc..f3c746ade 100644 --- a/cmd/rpc/open_im_conversation/main.go +++ b/cmd/rpc/open_im_conversation/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "RpcConversation default listen port 11300") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.ConversationPrometheusPort[0], "conversationPrometheusPort default listen port") flag.Parse() - fmt.Println("start conversation rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start conversation rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := rpcConversation.NewRpcConversationServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_friend/main.go b/cmd/rpc/open_im_friend/main.go index 176cb861d..ae5ae0090 100644 --- a/cmd/rpc/open_im_friend/main.go +++ b/cmd/rpc/open_im_friend/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "get RpcFriendPort from cmd,default 12000 as port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.FriendPrometheusPort[0], "friendPrometheusPort default listen port") flag.Parse() - fmt.Println("start friend rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start friend rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := friend.NewFriendServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_group/main.go b/cmd/rpc/open_im_group/main.go index b5e6cc2af..42b7f1f5c 100644 --- a/cmd/rpc/open_im_group/main.go +++ b/cmd/rpc/open_im_group/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "get RpcGroupPort from cmd,default 16000 as port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.GroupPrometheusPort[0], "groupPrometheusPort default listen port") flag.Parse() - fmt.Println("start group rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start group rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := group.NewGroupServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_msg/main.go b/cmd/rpc/open_im_msg/main.go index 3d92b615e..a9d87a7ba 100644 --- a/cmd/rpc/open_im_msg/main.go +++ b/cmd/rpc/open_im_msg/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.MessagePrometheusPort[0], "msgPrometheusPort default listen port") flag.Parse() - fmt.Println("start msg rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start msg rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := msg.NewRpcChatServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_office/main.go b/cmd/rpc/open_im_office/main.go index 5effa31cd..0af5444d6 100644 --- a/cmd/rpc/open_im_office/main.go +++ b/cmd/rpc/open_im_office/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.OfficePrometheusPort[0], "officePrometheusPort default listen port") flag.Parse() - fmt.Println("start office rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start office rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := rpc.NewOfficeServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_organization/main.go b/cmd/rpc/open_im_organization/main.go index dc88a75ad..5dc27ccd5 100644 --- a/cmd/rpc/open_im_organization/main.go +++ b/cmd/rpc/open_im_organization/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "get RpcOrganizationPort from cmd,default 11200 as port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.OrganizationPrometheusPort[0], "organizationPrometheusPort default listen port") flag.Parse() - fmt.Println("start organization rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start organization rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := organization.NewServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/cmd/rpc/open_im_user/main.go b/cmd/rpc/open_im_user/main.go index cdfa05a59..3e64ac805 100644 --- a/cmd/rpc/open_im_user/main.go +++ b/cmd/rpc/open_im_user/main.go @@ -14,7 +14,7 @@ func main() { rpcPort := flag.Int("port", defaultPorts[0], "rpc listening port") prometheusPort := flag.Int("prometheus_port", config.Config.Prometheus.UserPrometheusPort[0], "userPrometheusPort default listen port") flag.Parse() - fmt.Println("start user rpc server, port: ", *rpcPort, "version: ", constant.CurrentVersion, "\n") + fmt.Println("start user rpc server, port: ", *rpcPort, "OpenIM version: ", constant.CurrentVersion, "\n") rpcServer := user.NewUserServer(*rpcPort) go func() { err := promePkg.StartPromeSrv(*prometheusPort) diff --git a/internal/cms_api/admin/admin.go b/internal/cms_api/admin/admin.go index 7d4c450fb..2c98502da 100644 --- a/internal/cms_api/admin/admin.go +++ b/internal/cms_api/admin/admin.go @@ -3,6 +3,7 @@ package admin import ( apiStruct "Open_IM/pkg/cms_api_struct" "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbAdmin "Open_IM/pkg/proto/admin_cms" @@ -25,6 +26,7 @@ var ( ) func init() { + log.NewPrivateLog(constant.LogFileName) operationID := utils.OperationIDGenerator() log.NewInfo(operationID, utils.GetSelfFuncName(), "minio config: ", config.Config.Credential.Minio) var initUrl string