summaryrefslogtreecommitdiff
path: root/caddyconfig
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 /caddyconfig
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 'caddyconfig')
-rw-r--r--caddyconfig/httploader.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/caddyconfig/httploader.go b/caddyconfig/httploader.go
index e4d8159..80eab44 100644
--- a/caddyconfig/httploader.go
+++ b/caddyconfig/httploader.go
@@ -113,7 +113,7 @@ func (hl HTTPLoader) LoadConfig(ctx caddy.Context) ([]byte, error) {
return nil, err
}
for _, warn := range warnings {
- ctx.Logger(hl).Warn(warn.String())
+ ctx.Logger().Warn(warn.String())
}
return result, nil
@@ -129,7 +129,7 @@ func (hl HTTPLoader) makeClient(ctx caddy.Context) (*http.Client, error) {
// client authentication
if hl.TLS.UseServerIdentity {
- certs, err := ctx.IdentityCredentials(ctx.Logger(hl))
+ certs, err := ctx.IdentityCredentials(ctx.Logger())
if err != nil {
return nil, fmt.Errorf("getting server identity credentials: %v", err)
}