diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2022-09-16 16:55:30 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2022-09-16 16:55:36 -0600 |
commit | e43b6d81782ef79f22058179d8793f40cea89556 (patch) | |
tree | 13648af23e92b26cb28c13cb12c620bf746c819c /modules/caddyhttp/fileserver | |
parent | bffc2587329ca7e1f8a28edae9b5a9bf11e2fc7c (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/fileserver')
-rw-r--r-- | modules/caddyhttp/fileserver/matcher.go | 2 | ||||
-rw-r--r-- | modules/caddyhttp/fileserver/staticfiles.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/fileserver/matcher.go b/modules/caddyhttp/fileserver/matcher.go index 87a1524..2989e4b 100644 --- a/modules/caddyhttp/fileserver/matcher.go +++ b/modules/caddyhttp/fileserver/matcher.go @@ -256,7 +256,7 @@ func celFileMatcherMacroExpander() parser.MacroExpander { // Provision sets up m's defaults. func (m *MatchFile) Provision(ctx caddy.Context) error { - m.logger = ctx.Logger(m) + m.logger = ctx.Logger() // establish the file system to use if len(m.FileSystemRaw) > 0 { diff --git a/modules/caddyhttp/fileserver/staticfiles.go b/modules/caddyhttp/fileserver/staticfiles.go index 0639d97..8474338 100644 --- a/modules/caddyhttp/fileserver/staticfiles.go +++ b/modules/caddyhttp/fileserver/staticfiles.go @@ -167,7 +167,7 @@ func (FileServer) CaddyModule() caddy.ModuleInfo { // Provision sets up the static files responder. func (fsrv *FileServer) Provision(ctx caddy.Context) error { - fsrv.logger = ctx.Logger(fsrv) + fsrv.logger = ctx.Logger() // establish which file system (possibly a virtual one) we'll be using if len(fsrv.FileSystemRaw) > 0 { |