From 6f49cc5b639359988e5e3459e7b43622c89696db Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Fri, 8 Mar 2024 02:29:01 +0000 Subject: [PATCH] log rcon commands level INFO --- pkg/udpproxy/session.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/udpproxy/session.go b/pkg/udpproxy/session.go index a82519b..52c298b 100644 --- a/pkg/udpproxy/session.go +++ b/pkg/udpproxy/session.go @@ -1,9 +1,11 @@ package udpproxy import ( - "log" "net" + "strings" "time" + + log "github.com/sirupsen/logrus" ) type Session struct { @@ -62,6 +64,8 @@ func (s *Session) proxyTo(buf []byte) error { log.Println(err) return err } + parts := strings.Split(string(buf), " ") + log.Info("From [", s.caddr, "] Command: ", strings.Join(parts[2:], " ")) return nil }