Skip to content

Commit

Permalink
caddyhttp: Log 4xx as INFO; 5xx as ERROR (close #6106)
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed May 10, 2024
1 parent 399186a commit 4af38e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/caddyhttp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ func (s *Server) logRequest(
// wrapping may return multiple loggers, so we log to all of them
for _, logger := range loggers {
logAtLevel := logger.Info
if wrec.Status() >= 400 {
if wrec.Status() >= 500 {
logAtLevel = logger.Error
}
message := "handled request"
Expand Down

0 comments on commit 4af38e5

Please sign in to comment.