From 4af38e5ac8622df412ef8043f348185b050ec0b9 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 10 May 2024 15:52:50 -0600 Subject: [PATCH] caddyhttp: Log 4xx as INFO; 5xx as ERROR (close #6106) --- modules/caddyhttp/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index a931266e..408f3358 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -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"