summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2022-09-16 16:55:30 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2022-09-16 16:55:36 -0600
commite43b6d81782ef79f22058179d8793f40cea89556 (patch)
tree13648af23e92b26cb28c13cb12c620bf746c819c /modules/caddyhttp/reverseproxy
parentbffc2587329ca7e1f8a28edae9b5a9bf11e2fc7c (diff)
core: Variadic Context.Logger(); soft deprecation
Ideally I'd just remove the parameter to caddy.Context.Logger(), but this would break most Caddy plugins. Instead, I'm making it variadic and marking it as partially deprecated. In the future, I might completely remove the parameter once most plugins have updated.
Diffstat (limited to 'modules/caddyhttp/reverseproxy')
-rw-r--r--modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go2
-rw-r--r--modules/caddyhttp/reverseproxy/httptransport.go2
-rw-r--r--modules/caddyhttp/reverseproxy/reverseproxy.go2
-rw-r--r--modules/caddyhttp/reverseproxy/upstreams.go4
4 files changed, 5 insertions, 5 deletions
diff --git a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
index 6ff6ff4..ec194e7 100644
--- a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
+++ b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
@@ -94,7 +94,7 @@ func (Transport) CaddyModule() caddy.ModuleInfo {
// Provision sets up t.
func (t *Transport) Provision(ctx caddy.Context) error {
- t.logger = ctx.Logger(t)
+ t.logger = ctx.Logger()
if t.Root == "" {
t.Root = "{http.vars.root}"
diff --git a/modules/caddyhttp/reverseproxy/httptransport.go b/modules/caddyhttp/reverseproxy/httptransport.go
index e9c7ddd..ec5d2f2 100644
--- a/modules/caddyhttp/reverseproxy/httptransport.go
+++ b/modules/caddyhttp/reverseproxy/httptransport.go
@@ -195,7 +195,7 @@ func (h *HTTPTransport) NewTransport(caddyCtx caddy.Context) (*http.Transport, e
TCPConn: tcpConn,
readTimeout: time.Duration(h.ReadTimeout),
writeTimeout: time.Duration(h.WriteTimeout),
- logger: caddyCtx.Logger(h),
+ logger: caddyCtx.Logger(),
}
}
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go
index dc1458d..4c8b29b 100644
--- a/modules/caddyhttp/reverseproxy/reverseproxy.go
+++ b/modules/caddyhttp/reverseproxy/reverseproxy.go
@@ -217,7 +217,7 @@ func (h *Handler) Provision(ctx caddy.Context) error {
}
h.events = eventAppIface.(*caddyevents.App)
h.ctx = ctx
- h.logger = ctx.Logger(h)
+ h.logger = ctx.Logger()
h.connections = make(map[io.ReadWriteCloser]openConnection)
h.connectionsMu = new(sync.Mutex)
diff --git a/modules/caddyhttp/reverseproxy/upstreams.go b/modules/caddyhttp/reverseproxy/upstreams.go
index b9f85a2..7a90016 100644
--- a/modules/caddyhttp/reverseproxy/upstreams.go
+++ b/modules/caddyhttp/reverseproxy/upstreams.go
@@ -76,7 +76,7 @@ func (SRVUpstreams) CaddyModule() caddy.ModuleInfo {
}
func (su *SRVUpstreams) Provision(ctx caddy.Context) error {
- su.logger = ctx.Logger(su)
+ su.logger = ctx.Logger()
if su.Refresh == 0 {
su.Refresh = caddy.Duration(time.Minute)
}
@@ -383,7 +383,7 @@ func (MultiUpstreams) CaddyModule() caddy.ModuleInfo {
}
func (mu *MultiUpstreams) Provision(ctx caddy.Context) error {
- mu.logger = ctx.Logger(mu)
+ mu.logger = ctx.Logger()
if mu.SourcesRaw != nil {
mod, err := ctx.LoadModule(mu, "SourcesRaw")