only log client IP (remove port)

log game server address
This commit is contained in:
onyx-and-iris 2024-03-08 02:42:01 +00:00
parent d8015c921c
commit a01df2e905

View File

@ -65,7 +65,7 @@ func (s *Session) proxyTo(buf []byte) error {
return err return err
} }
parts := strings.Split(string(buf), " ") parts := strings.Split(string(buf), " ")
log.Info("From [", s.caddr, "] Command: ", strings.Join(parts[2:], " ")) log.Info("From [", s.caddr.IP, "] To [", s.serverConn.RemoteAddr().String(), "] Command: ", strings.Join(parts[2:], " "))
return nil return nil
} }