From ea5e69e26d7eb8e3844c724795bb54487e29e205 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Mon, 15 Nov 2021 10:22:20 +0800 Subject: [PATCH] log change --- internal/rpc/friend/add_friend.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rpc/friend/add_friend.go b/internal/rpc/friend/add_friend.go index 56639f90e..6bb22f0ef 100644 --- a/internal/rpc/friend/add_friend.go +++ b/internal/rpc/friend/add_friend.go @@ -59,7 +59,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri //Parse token, to find current user information claims, err := utils.ParseToken(req.Token) if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + log.NewError(req.OperationID, "parse token failed", err.Error()) c.ErrorCode = config.ErrAddFriend.ErrCode c.ErrorMsg = config.ErrParseToken.ErrMsg return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil @@ -72,7 +72,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil } if _, err = im_mysql_model.FindUserByUID(req.OwnerUid); err != nil { - log.Error(req.Token, req.OperationID, "this user not exists,cant not add friend", req.OwnerUid) + log.NewError(req.OperationID, "this user not exists,cant not add friend", req.OwnerUid) c.ErrorCode = config.ErrAddFriend.ErrCode c.ErrorMsg = "this user not exists,cant not add friend" return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil