diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2021-09-24 18:29:23 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2021-09-24 18:29:23 -0600 |
commit | 3336faf25466b1b2d9a007f5468d05a887e16775 (patch) | |
tree | 38db30d754cef8748fe45b57ecc13f8847446b6d /modules/caddyhttp/reverseproxy | |
parent | 16f752125fb5d6fe46b9dea95eec8804bfdb24f8 (diff) |
reverseproxy: Log error at error level (fix #4360)
Diffstat (limited to 'modules/caddyhttp/reverseproxy')
-rw-r--r-- | modules/caddyhttp/reverseproxy/reverseproxy.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index 671ea04..aad3c74 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -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", |