mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
caddyhttp: Log 4xx as INFO; 5xx as ERROR (close #6106)
This commit is contained in:
parent
399186abfc
commit
4af38e5ac8
1 changed files with 1 additions and 1 deletions
|
@ -784,7 +784,7 @@ func (s *Server) logRequest(
|
||||||
// wrapping may return multiple loggers, so we log to all of them
|
// wrapping may return multiple loggers, so we log to all of them
|
||||||
for _, logger := range loggers {
|
for _, logger := range loggers {
|
||||||
logAtLevel := logger.Info
|
logAtLevel := logger.Info
|
||||||
if wrec.Status() >= 400 {
|
if wrec.Status() >= 500 {
|
||||||
logAtLevel = logger.Error
|
logAtLevel = logger.Error
|
||||||
}
|
}
|
||||||
message := "handled request"
|
message := "handled request"
|
||||||
|
|
Loading…
Reference in a new issue