From ac3bd6c2bf30d7bfda773a9cbef812009a07a5e0 Mon Sep 17 00:00:00 2001 From: Vladislav Veselskiy Date: Fri, 12 Apr 2024 20:21:13 +0300 Subject: [PATCH] Log body len. --- server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index d042422..7028fa8 100644 --- a/server.go +++ b/server.go @@ -94,7 +94,8 @@ func (server *RPCServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { payload, err := ioutil.ReadAll(r.Body) if err != nil { - server.logger.Error(err, "Error reading body", "client_ver", cltVersion, "client_ip", cltIP) + payloadLen := len(payload) + server.logger.Error(err, "Error reading body", "client_ver", cltVersion, "client_ip", cltIP, "body_len", payloadLen) return }