Skip to content

Commit 4af38e5

Browse files
committed
caddyhttp: Log 4xx as INFO; 5xx as ERROR (close #6106)
1 parent 399186a commit 4af38e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/caddyhttp/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ func (s *Server) logRequest(
784784
// wrapping may return multiple loggers, so we log to all of them
785785
for _, logger := range loggers {
786786
logAtLevel := logger.Info
787-
if wrec.Status() >= 400 {
787+
if wrec.Status() >= 500 {
788788
logAtLevel = logger.Error
789789
}
790790
message := "handled request"

0 commit comments

Comments
 (0)