diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index e892e6813..5e0a555c1 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -276,7 +276,7 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) { return } } - this.gateway.Debugf("agent:%s uId:%s MessageDistribution t:%v reply:%v", this.sessionId, this.uId, time.Since(stime), reply) + this.gateway.Debugf("agent:%s uId:%s MessageDistribution t:%v reply:%v", this.sessionId, this.uId, time.Since(stime).Milliseconds(), reply) if reply.Code != pb.ErrorCode_Success { data, _ := anypb.New(&pb.NotifyErrorNotifyPush{ ReqMainType: msg.MainType, diff --git a/services/comp_gateroute.go b/services/comp_gateroute.go index 54cc89389..64dd36f40 100644 --- a/services/comp_gateroute.go +++ b/services/comp_gateroute.go @@ -157,7 +157,7 @@ func (this *SCompGateRoute) ReceiveMsg(ctx context.Context, args *pb.AgentMessag } // log.Errorf("[Handle Api] t:%v m:%s req:%v reply:%v", time.Since(stime), method, msg, reply) log.Error("[Handle Api]", - log.Field{Key: "t", Value: time.Since(stime)}, + log.Field{Key: "t", Value: time.Since(stime).Milliseconds()}, log.Field{Key: "m", Value: method}, log.Field{Key: "uid", Value: args.UserId}, log.Field{Key: "req", Value: msg}, @@ -168,7 +168,7 @@ func (this *SCompGateRoute) ReceiveMsg(ctx context.Context, args *pb.AgentMessag if this.options.Debug { // log.Debugf("[Handle Api] t:%v m:%s uid:%s req:%v reply:%v", time.Since(stime), method, args.UserId, msg, reply) log.Debug("[Handle Api]", - log.Field{Key: "t", Value: time.Since(stime)}, + log.Field{Key: "t", Value: time.Since(stime).Milliseconds()}, log.Field{Key: "m", Value: method}, log.Field{Key: "uid", Value: args.UserId}, log.Field{Key: "req", Value: msg},