Skip to content

Commit

Permalink
Second half of 6dce493
Browse files Browse the repository at this point in the history
Not sure how it got unstaged
  • Loading branch information
mholt committed May 10, 2024
1 parent 6dce493 commit 399186a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/caddyhttp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
}
}

Expand Down

0 comments on commit 399186a

Please sign in to comment.