mirror of
https://github.com/caddyserver/caddy.git
synced 2026-01-16 17:20:34 +00: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user