aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/caddyhttp/server.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go
index 5c7bd8936..a931266ee 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...)
}
}