@marcel91200 / caddy Mirror · read-only / commits / 3336faf2
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 14, 04:00 UTC

reverseproxy: Log error at error level (fix #4360)

Matthew Holt committed Sep 24, 2021 at 18:29 UTC 3336faf25466b1b2d9a007f5468d05a887e16775
1 file changed +2 -3
modules/caddyhttp/reverseproxy/reverseproxy.go
+2 -3
@@ -574,12 +574,11 @@ func (h *Handler) reverseProxy(rw http.ResponseWriter, req *http.Request, repl *
574 duration := time.Since(start)
575 logger := h.logger.With(
576 zap.String("upstream", di.Upstream.String()),
577 + zap.Duration("duration", duration),
578 zap.Object("request", caddyhttp.LoggableHTTPRequest{Request: req}),
579 )
580 if err != nil {
580 - logger.Debug("upstream roundtrip",
581 - zap.Duration("duration", duration),
582 - zap.Error(err))
581 + logger.Error("upstream roundtrip", zap.Error(err))
582 return err
583 }
584 logger.Debug("upstream roundtrip",