aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/caddyauth
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2022-09-16 16:55:30 -0600
committerMatthew Holt <[email protected]>2022-09-16 16:55:36 -0600
commite43b6d81782ef79f22058179d8793f40cea89556 (patch)
tree13648af23e92b26cb28c13cb12c620bf746c819c /modules/caddyhttp/caddyauth
parentbffc2587329ca7e1f8a28edae9b5a9bf11e2fc7c (diff)
downloadcaddy-e43b6d81782ef79f22058179d8793f40cea89556.tar.gz
caddy-e43b6d81782ef79f22058179d8793f40cea89556.zip
core: Variadic Context.Logger(); soft deprecationv2.6.0-beta.4
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/caddyauth')
-rw-r--r--modules/caddyhttp/caddyauth/caddyauth.go2
-rw-r--r--modules/caddyhttp/caddyauth/hashes.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/caddyauth/caddyauth.go b/modules/caddyhttp/caddyauth/caddyauth.go
index ae30a0863..b2bdbc22f 100644
--- a/modules/caddyhttp/caddyauth/caddyauth.go
+++ b/modules/caddyhttp/caddyauth/caddyauth.go
@@ -56,7 +56,7 @@ func (Authentication) CaddyModule() caddy.ModuleInfo {
// Provision sets up a.
func (a *Authentication) Provision(ctx caddy.Context) error {
- a.logger = ctx.Logger(a)
+ a.logger = ctx.Logger()
a.Providers = make(map[string]Authenticator)
mods, err := ctx.LoadModule(a, "ProvidersRaw")
if err != nil {
diff --git a/modules/caddyhttp/caddyauth/hashes.go b/modules/caddyhttp/caddyauth/hashes.go
index 6505d187c..6a651f0d9 100644
--- a/modules/caddyhttp/caddyauth/hashes.go
+++ b/modules/caddyhttp/caddyauth/hashes.go
@@ -92,7 +92,7 @@ func (ScryptHash) CaddyModule() caddy.ModuleInfo {
// Provision sets up s.
func (s *ScryptHash) Provision(ctx caddy.Context) error {
s.SetDefaults()
- ctx.Logger(s).Warn("use of 'scrypt' is deprecated, please use 'bcrypt' instead")
+ ctx.Logger().Warn("use of 'scrypt' is deprecated, please use 'bcrypt' instead")
return nil
}