Commit 78f77d43 authored by hujiebin's avatar hujiebin

feat:去掉无用日志

parent ff87a090
......@@ -130,7 +130,7 @@ func (s *server) Login(ctx context.Context, in *userCenter.LoginMessage) (*userC
}
func (s *server) Logout(ctx context.Context, in *userCenter.LogoutMessage) (*userCenter.LogoutMessageRsp, error) {
mylogrus.MyLog.Infof("Received logoutMsg: %s, %d\n", in.GetClientAddr(), in.GetUid())
//mylogrus.MyLog.Infof("Received logoutMsg: %s, %d\n", in.GetClientAddr(), in.GetUid())
addr := termManager.GetTerminal(in.Uid)
if addr != nil && *addr == in.ClientAddr {
......@@ -156,7 +156,7 @@ func (s *server) Logout(ctx context.Context, in *userCenter.LogoutMessage) (*use
}
func (s *server) Multicast(ctx context.Context, in *userCenter.MulticastMessage) (*userCenter.MulticastMessageRsp, error) {
mylogrus.MyLog.Infof("Multicasting msgType = %d to %v, size = %d\n", in.MsgType, in.Uids, len(in.PayLoad))
//mylogrus.MyLog.Infof("Multicasting msgType = %d to %v, size = %d\n", in.MsgType, in.Uids, len(in.PayLoad))
failed := []uint64{}
for _, uid := range in.Uids {
......@@ -187,7 +187,7 @@ func (s *server) Multicast(ctx context.Context, in *userCenter.MulticastMessage)
}
func (s *server) Broadcast(ctx context.Context, in *userCenter.BroadcastMessage) (*userCenter.BroadcastMessageRsp, error) {
mylogrus.MyLog.Infof("Broadcasting msgType = %d, size = %d\n", in.MsgType, len(in.PayLoad))
//mylogrus.MyLog.Infof("Broadcasting msgType = %d, size = %d\n", in.MsgType, len(in.PayLoad))
failed := []uint64{}
terminals := termManager.GetAll()
......@@ -306,7 +306,9 @@ func realBroadcast(addr string, uids []uint64, msg *userCenter.BroadcastMessage)
toRouterClient := userCenter.NewRouterClient(client)
status, err := routeMessage(toRouterClient, uid, msg.MsgType, msg.PayLoad)
mylogrus.MyLog.Infof("routeMessage uid = %d, msgType = %d, status = %d, %v", uid, msg.MsgType, status, err)
if err != nil {
mylogrus.MyLog.Errorf("routeMessage uid = %d, msgType = %d, status = %d, %v", uid, msg.MsgType, status, err)
}
}
}
}
......@@ -322,7 +324,7 @@ func routeMessage(c userCenter.RouterClient, uid uint64, msgType uint32, data []
if err != nil {
mylogrus.MyLog.Errorf("Route message to user %d, err: %s\n", uid, err.Error())
} else if r != nil {
mylogrus.MyLog.Infof("Route message to user %d, status = %d", uid, r.Status)
//mylogrus.MyLog.Infof("Route message to user %d, status = %d", uid, r.Status)
return r.Status, err
}
return 0, err
......@@ -616,7 +618,7 @@ func kick(n int) {
func broadcast(n int) {
for msg := range broadcastChan {
mylogrus.MyLog.Infof("handling broadcast in:%d,msg:%+v", n, msg)
//mylogrus.MyLog.Infof("handling broadcast in:%d,msg:%+v", n, msg)
realBroadcast(msg.ProxyAddr, msg.UserIds, msg.in) // fixme: 这里还有优化空间,广播能否在proxy层做批量
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment