From f6f0044a845a3af9e02afcb73d32146738cf6336 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 20 Mar 2024 21:49:05 +0000 Subject: [PATCH] Only stringify rcon responses if debug enabled. --- pkg/udpproxy/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/udpproxy/session.go b/pkg/udpproxy/session.go index 72e7bf0..829dc7a 100644 --- a/pkg/udpproxy/session.go +++ b/pkg/udpproxy/session.go @@ -85,7 +85,7 @@ func (s *Session) proxyFrom(buf []byte) error { return err } - if s.isRconResponsePacket(buf) { + if s.isRconResponsePacket(buf) && log.GetLevel() == log.DebugLevel { parts := strings.Split(string(buf[10:]), " ") log.Debugf("Response: %s", strings.Join(parts, " ")) }