diff options
author | Matthew Holt <[email protected]> | 2024-05-10 15:51:28 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2024-05-10 15:51:28 -0600 |
commit | 399186abfce674ceccb7c9197fa11158d101f485 (patch) | |
tree | 085b39fb21d06514d62e8d6abbb11ee19ddc7e2b | |
parent | 6dce4934f0ba3bbf4e69273faf6d00db8f4c2852 (diff) | |
download | caddy-399186abfce674ceccb7c9197fa11158d101f485.tar.gz caddy-399186abfce674ceccb7c9197fa11158d101f485.zip |
Second half of 6dce493
Not sure how it got unstaged
-rw-r--r-- | modules/caddyhttp/server.go | 7 |
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...) } } |