1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

Second half of 6dce493

Not sure how it got unstaged
This commit is contained in:
Matthew Holt 2024-05-10 15:51:28 -06:00
parent 6dce4934f0
commit 399186abfc
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -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...)
}
}