From beadb78fd31814d0a432cb41929d17c0ad175920 Mon Sep 17 00:00:00 2001 From: Adrien PONSIN Date: Tue, 15 Apr 2025 19:48:15 +0200 Subject: [PATCH] add debug log --- command/serve.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command/serve.go b/command/serve.go index 699b3b1..2978389 100644 --- a/command/serve.go +++ b/command/serve.go @@ -188,6 +188,7 @@ func checkMethodPath(w http.ResponseWriter, r *http.Request, mr methodRegex) err http.Error(w, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed) return ErrHTTPMethodNotAllowed{httpMethod: r.Method} } + log.Debug().Msgf("%s is a registered HTTP method", r.Method) if !req.MatchString(r.URL.Path) { http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden) return ErrNoMatch{ @@ -195,6 +196,7 @@ func checkMethodPath(w http.ResponseWriter, r *http.Request, mr methodRegex) err httpMethod: r.Method, } } + log.Debug().Msgf("%s matches %s", r.URL.Path, req.String()) return nil }