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 { if wrec.Status() >= 400 {
logAtLevel = logger.Error logAtLevel = logger.Error
} }
message := "handled request"
logAtLevel("handled request", fields...) if nop, ok := GetVar(r.Context(), "unhandled").(bool); ok && nop {
message = "NOP"
}
logAtLevel(message, fields...)
} }
} }