aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2024-05-10 15:52:50 -0600
committerMatthew Holt <[email protected]>2024-05-10 15:52:50 -0600
commit4af38e5ac8622df412ef8043f348185b050ec0b9 (patch)
tree8f2fd3279f97528aae4b9d79a2cb861eed368b19
parent399186abfce674ceccb7c9197fa11158d101f485 (diff)
downloadcaddy-4af38e5ac8622df412ef8043f348185b050ec0b9.tar.gz
caddy-4af38e5ac8622df412ef8043f348185b050ec0b9.zip
caddyhttp: Log 4xx as INFO; 5xx as ERROR (close #6106)
-rw-r--r--modules/caddyhttp/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go
index a931266ee..408f3358c 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"