0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-20 22:52:58 -05:00

logging: Fix crash if logging error is not HandlerError (#6777)

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
Omar Ramadan 2025-01-16 09:06:29 -08:00 committed by GitHub
parent 2c4295ee48
commit 9e0e5a4b4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -211,6 +211,11 @@ func errLogValues(err error) (status int, msg string, fields func() []zapcore.Fi
}
return
}
fields = func() []zapcore.Field {
return []zapcore.Field{
zap.Error(err),
}
}
status = http.StatusInternalServerError
msg = err.Error()
return