Commit 0f76eaf8 authored by hujiebin's avatar hujiebin

feat:精简日志

parent b6053ce9
......@@ -89,7 +89,7 @@ var kasp = keepalive.ServerParameters{
}
func (s *server) Login(ctx context.Context, in *userCenter.LoginMessage) (*userCenter.LoginMessageRsp, error) {
mylogrus.MyLog.Infof("Received loginMsg: %s, from proxy %s, client %s\n", in.Token, in.ProxyAddr, in.ClientAddr)
//mylogrus.MyLog.Infof("Received loginMsg: %s, from proxy %s, client %s\n", in.Token, in.ProxyAddr, in.ClientAddr)
var loginStatus uint32 = common.Login_success
claim, err := common.ParseToken(in.GetToken())
......@@ -106,7 +106,7 @@ func (s *server) Login(ctx context.Context, in *userCenter.LoginMessage) (*userC
// FIXME: 发现用户已经登录,要踢走旧连接
proxyAddr := userManager.GetUser(claim.UserId)
if proxyAddr != nil {
mylogrus.MyLog.Infof("%d has existing value %s", claim.UserId, *proxyAddr)
//mylogrus.MyLog.Infof("%d has existing value %s", claim.UserId, *proxyAddr)
kickChan <- KickChanMsg{
userId: claim.UserId,
proxyAddr: *proxyAddr,
......@@ -127,7 +127,7 @@ func (s *server) Login(ctx context.Context, in *userCenter.LoginMessage) (*userC
} else {
mylogrus.MyLog.Errorf("wrong user %d", claim.UserId)
}
mylogrus.MyLog.Infof("adding user %d", claim.UserId)
//mylogrus.MyLog.Infof("adding user %d", claim.UserId)
// save to redis
userManager.AddUser(claim.UserId, in.ProxyAddr)
......@@ -693,7 +693,7 @@ func main() {
func kick(n int) {
for msg := range kickChan {
mylogrus.MyLog.Infof("handling kick in:%d,msg:%+v", n, msg)
//mylogrus.MyLog.Infof("handling kick in:%d,msg:%+v", n, msg)
clientAddr := termManager.GetTerminal(msg.userId)
if clientAddr == nil {
//mylogrus.MyLog.Errorf("No terminal found for %d", msg.userId)
......
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