summaryrefslogtreecommitdiff
path: root/modules/caddypki
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/caddypki
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/caddypki')
-rw-r--r--modules/caddypki/acmeserver/acmeserver.go2
-rw-r--r--modules/caddypki/adminapi.go2
-rw-r--r--modules/caddypki/pki.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/caddypki/acmeserver/acmeserver.go b/modules/caddypki/acmeserver/acmeserver.go
index ff021b4..921d0b8 100644
--- a/modules/caddypki/acmeserver/acmeserver.go
+++ b/modules/caddypki/acmeserver/acmeserver.go
@@ -87,7 +87,7 @@ func (Handler) CaddyModule() caddy.ModuleInfo {
// Provision sets up the ACME server handler.
func (ash *Handler) Provision(ctx caddy.Context) error {
- ash.logger = ctx.Logger(ash)
+ ash.logger = ctx.Logger()
// set some defaults
if ash.CA == "" {
ash.CA = caddypki.DefaultCAID
diff --git a/modules/caddypki/adminapi.go b/modules/caddypki/adminapi.go
index b4d2695..f03c6b6 100644
--- a/modules/caddypki/adminapi.go
+++ b/modules/caddypki/adminapi.go
@@ -47,7 +47,7 @@ func (adminAPI) CaddyModule() caddy.ModuleInfo {
// Provision sets up the adminAPI module.
func (a *adminAPI) Provision(ctx caddy.Context) error {
a.ctx = ctx
- a.log = ctx.Logger(a)
+ a.log = ctx.Logger(a) // TODO: passing in 'a' is a hack until the admin API is officially extensible (see #5032)
// First check if the PKI app was configured, because
// a.ctx.App() has the side effect of instantiating
diff --git a/modules/caddypki/pki.go b/modules/caddypki/pki.go
index 4fd0bb5..2caeb2b 100644
--- a/modules/caddypki/pki.go
+++ b/modules/caddypki/pki.go
@@ -54,7 +54,7 @@ func (PKI) CaddyModule() caddy.ModuleInfo {
// Provision sets up the configuration for the PKI app.
func (p *PKI) Provision(ctx caddy.Context) error {
p.ctx = ctx
- p.log = ctx.Logger(p)
+ p.log = ctx.Logger()
for caID, ca := range p.CAs {
err := ca.Provision(ctx, caID, p.log)