mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 14:11:50 +08:00
reverseproxy: Log error at error level (fix #4360)
This commit is contained in:
parent
16f752125f
commit
3336faf254
|
@ -574,12 +574,11 @@ func (h *Handler) reverseProxy(rw http.ResponseWriter, req *http.Request, repl *
|
|||
duration := time.Since(start)
|
||||
logger := h.logger.With(
|
||||
zap.String("upstream", di.Upstream.String()),
|
||||
zap.Duration("duration", duration),
|
||||
zap.Object("request", caddyhttp.LoggableHTTPRequest{Request: req}),
|
||||
)
|
||||
if err != nil {
|
||||
logger.Debug("upstream roundtrip",
|
||||
zap.Duration("duration", duration),
|
||||
zap.Error(err))
|
||||
logger.Error("upstream roundtrip", zap.Error(err))
|
||||
return err
|
||||
}
|
||||
logger.Debug("upstream roundtrip",
|
||||
|
|
Loading…
Reference in New Issue
Block a user