mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 22:23:48 +03:00
reverseproxy: Log error at error level (fix #4360)
This commit is contained in:
parent
16f752125f
commit
3336faf254
1 changed files with 2 additions and 3 deletions
|
@ -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 a new issue