From 1062c66f4e9d841af14aba1a110341be47c92845 Mon Sep 17 00:00:00 2001 From: seeforschauer Date: Fri, 20 Mar 2026 10:57:07 +0200 Subject: [PATCH] fix: replace *http.Request in log field with JSON-safe fields Fixes #894. *http.Request contains GetBody func() which encoding/json cannot marshal. When using JSON log format (-json flag), logrus silently drops the log entry. Replace the raw request with method, url, and content-type fields. --- server/register_validator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/register_validator.go b/server/register_validator.go index eab6eb1f..9a06f4fd 100644 --- a/server/register_validator.go +++ b/server/register_validator.go @@ -48,7 +48,9 @@ func (m *BoostService) registerValidator(log *logrus.Entry, regBytes []byte, hea } log.WithFields(logrus.Fields{ - "request": req, + "method": req.Method, + "url": req.URL.String(), + "contentType": req.Header.Get("Content-Type"), }).Debug("sending the registerValidator request") // Send the request