Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 12, 13:15 UTC
caddyhttp: Log 4xx as INFO; 5xx as ERROR (close #6106)
Matthew Holt committed
May 10, 2024 at 15:52 UTC
4af38e5ac8622df412ef8043f348185b050ec0b9
1 file changed
+1
-1
modules/caddyhttp/server.go
+1
-1
@@ -784,7 +784,7 @@ func (s *Server) logRequest(
784
// wrapping may return multiple loggers, so we log to all of them
785
for _, logger := range loggers {
786
logAtLevel := logger.Info
787
- if wrec.Status() >= 400 {
787
+ if wrec.Status() >= 500 {
788
logAtLevel = logger.Error
789
}
790
message := "handled request"