From a79cdd1dfae08596fdaadf48d3b1c0f3b225284a Mon Sep 17 00:00:00 2001 From: Romain Date: Fri, 8 Nov 2024 14:28:08 +0100 Subject: [PATCH] Change level of peeking first byte error log to DEBUG Co-authored-by: Kevin Pollet --- pkg/server/router/tcp/router.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/server/router/tcp/router.go b/pkg/server/router/tcp/router.go index 4790cd751..f8d657265 100644 --- a/pkg/server/router/tcp/router.go +++ b/pkg/server/router/tcp/router.go @@ -350,7 +350,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { if err != nil { var opErr *net.OpError if !errors.Is(err, io.EOF) && (!errors.As(err, &opErr) || !opErr.Timeout()) { - log.WithoutContext().Errorf("Error while Peeking first byte: %s", err) + log.WithoutContext().Debugf("Error while peeking first byte: %s", err) } return nil, err } @@ -376,7 +376,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { const recordHeaderLen = 5 hdr, err = br.Peek(recordHeaderLen) if err != nil { - log.Errorf("Error while Peeking hello: %s", err) + log.WithoutContext().Errorf("Error while peeking client hello headers: %s", err) return &clientHello{ peeked: getPeeked(br), }, nil @@ -390,7 +390,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { helloBytes, err := br.Peek(recordHeaderLen + recLen) if err != nil { - log.Errorf("Error while Hello: %s", err) + log.WithoutContext().Errorf("Error while peeking client hello bytes: %s", err) return &clientHello{ isTLS: true, peeked: getPeeked(br), @@ -419,7 +419,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { func getPeeked(br *bufio.Reader) string { peeked, err := br.Peek(br.Buffered()) if err != nil { - log.Errorf("Could not get anything: %s", err) + log.WithoutContext().Errorf("Error while peeking bytes: %s", err) return "" } return string(peeked)