caddyhttp: Log 4xx as INFO; 5xx as ERROR (close #6106)

This commit is contained in:
Matthew Holt committed 2024-05-10 15:52:50 -06:00
1 parent 399186abfc
commit 4af38e5ac8
1 file changed
+1 -1
+1 -1
View File
@@ -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"