This is an automated email from the ASF dual-hosted git repository.

tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new bd28b1e  [SCB-2094] Bugfix-the printing information of relevant logs 
is not clear (#877)
bd28b1e is described below

commit bd28b1e72b245bae5aa1025eab2200ace81e7b13
Author: robotLJW <790504...@qq.com>
AuthorDate: Wed Mar 3 16:29:58 2021 +0800

    [SCB-2094] Bugfix-the printing information of relevant logs is not clear 
(#877)
---
 datasource/mongo/ms.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/datasource/mongo/ms.go b/datasource/mongo/ms.go
index a2732ac..a049c8b 100644
--- a/datasource/mongo/ms.go
+++ b/datasource/mongo/ms.go
@@ -1634,7 +1634,7 @@ func (ds *DataSource) GetInstance(ctx context.Context, 
request *discovery.GetOne
        serviceIDs = filterServiceIDs(ctx, request.ConsumerServiceId, 
request.Tags, services)
        if len(serviceIDs) == 0 {
                mes := fmt.Errorf("%s failed, provider instance does not 
exist", findFlag())
-               log.Error("get instance failed", err)
+               log.Error("query service failed", mes)
                return &discovery.GetOneInstanceResponse{
                        Response: 
discovery.CreateResponse(discovery.ErrInstanceNotExists, mes.Error()),
                }, nil
@@ -1659,7 +1659,7 @@ func (ds *DataSource) GetInstance(ctx context.Context, 
request *discovery.GetOne
                }
                if !isExist {
                        mes := fmt.Errorf("%s failed, provider instance does 
not exist", findFlag())
-                       log.Error("get instance failed", err)
+                       log.Error("get instance failed", mes)
                        return &discovery.GetOneInstanceResponse{
                                Response: 
discovery.CreateResponse(discovery.ErrInstanceNotExists, mes.Error()),
                        }, nil
@@ -1729,7 +1729,7 @@ func (ds *DataSource) GetInstances(ctx context.Context, 
request *discovery.GetIn
        serviceIDs := filterServiceIDs(ctx, request.ConsumerServiceId, 
request.Tags, []*Service{provider})
        if len(serviceIDs) == 0 {
                mes := fmt.Errorf("%s failed, provider does not exist", 
findFlag())
-               log.Error("get instances failed", mes)
+               log.Error("query service failed", mes)
                return &discovery.GetInstancesResponse{
                        Response: 
discovery.CreateResponse(discovery.ErrServiceNotExists, mes.Error()),
                }, nil

Reply via email to