From 399186abfce674ceccb7c9197fa11158d101f485 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 10 May 2024 15:51:28 -0600 Subject: [PATCH] Second half of 6dce493 Not sure how it got unstaged --- modules/caddyhttp/server.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index 5c7bd893..a931266e 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -787,8 +787,11 @@ func (s *Server) logRequest( if wrec.Status() >= 400 { logAtLevel = logger.Error } - - logAtLevel("handled request", fields...) + message := "handled request" + if nop, ok := GetVar(r.Context(), "unhandled").(bool); ok && nop { + message = "NOP" + } + logAtLevel(message, fields...) } }