@marcel91200 / caddy Mirror · read-only / commits / 9e0e5a4b
Fork 0

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, 03:15 UTC

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

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>

Omar Ramadan committed Jan 16, 2025 at 09:06 UTC 9e0e5a4b4c2babda81c58f28fe61adfa91d04524
1 file changed +5
modules/caddyhttp/logging.go
+5
@@ -211,6 +211,11 @@ func errLogValues(err error) (status int, msg string, fields func() []zapcore.Fi
211 }
212 return
213 }
214 + fields = func() []zapcore.Field {
215 + return []zapcore.Field{
216 + zap.Error(err),
217 + }
218 + }
219 status = http.StatusInternalServerError
220 msg = err.Error()
221 return