Added upstream url to upstream-related log messages
@@ -88,13 +88,14 @@ func (p *Register) createDirector(proxyDefinition *Definition, balancer Balancer
log.WithField("target", upstream.Target).Debug("Target upstream elected")
upstreamURL = upstream.Target
} else {
- log.Warn("The upstream URL is deprecated. Use Upstreams instead")
+ log.WithField("upstream_url", proxyDefinition.UpstreamURL).
+ Warn("The upstream URL is deprecated. Use Upstreams instead")
upstreamURL = proxyDefinition.UpstreamURL
}
target, err := url.Parse(upstreamURL)
if err != nil {
- log.WithError(err).Error("Could not parse the target URL")
+ log.WithError(err).WithField("upstream_url", upstreamURL).Error("Could not parse the target URL")
return
}
