From 3b493e90472cc6748a480ed921ce248adec2fac1 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Tue, 12 May 2026 07:43:18 -0500 Subject: [PATCH] Lower packet/frame logs to trace and player with closed connection (#527) --- mcproto/read.go | 6 +++--- server/connector.go | 1 + server/docker.go | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mcproto/read.go b/mcproto/read.go index fe1fadf..28b9a90 100644 --- a/mcproto/read.go +++ b/mcproto/read.go @@ -85,7 +85,7 @@ func ReadPacket(reader *bufio.Reader, addr net.Addr, state State) (*Packet, erro logrus. WithField("client", addr). WithField("packet", packet). - Debug("Read packet") + Trace("Read packet") return packet, nil } @@ -206,7 +206,7 @@ func ReadFrame(reader io.Reader, addr net.Addr) (*Frame, error) { logrus. WithField("client", addr). WithField("length", frame.Length). - Debug("Read frame length") + Trace("Read frame length") frame.Payload = make([]byte, frame.Length) total := 0 @@ -223,7 +223,7 @@ func ReadFrame(reader io.Reader, addr net.Addr) (*Frame, error) { WithField("client", addr). WithField("total", total). WithField("length", frame.Length). - Debug("Reading frame content") + Trace("Reading frame content") if n == 0 { logrus. diff --git a/server/connector.go b/server/connector.go index 63f462c..b94c54d 100644 --- a/server/connector.go +++ b/server/connector.go @@ -526,6 +526,7 @@ func (c *Connector) cleanupBackendConnection(clientAddr net.Addr, serverAddress logrus. WithField("client", clientAddr). WithField("backendHostPort", backendHostPort). + WithField("player", playerInfo). WithField("connectionCount", c.activeConnections.GetCount(backendHostPort)). Info("Closed connection to backend") if checkScaleDown && c.scaleActiveConnections.GetCount(scalingTarget) <= 0 { diff --git a/server/docker.go b/server/docker.go index 7cae656..589d0ab 100644 --- a/server/docker.go +++ b/server/docker.go @@ -482,6 +482,9 @@ func (w *dockerWatcherImpl) listContainers(ctx context.Context) ([]*routableCont if !data.notRunning { endpoint = fmt.Sprintf("%s:%d", data.ip, data.port) } + logrus.WithField("backendEndpoint", endpoint). + WithField("containerID", container.ID). + Debug("Found routable Docker container") for _, host := range data.hosts { result = append(result, &routableContainer{