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.
This commit is contained in:
Matthew Holt
2022-09-16 16:55:30 -06:00
parent bffc258732
commit e43b6d8178
27 changed files with 71 additions and 67 deletions

View File

@ -61,7 +61,7 @@ func (Handler) CaddyModule() caddy.ModuleInfo {
// Provision sets up h.
func (h *Handler) Provision(ctx caddy.Context) error {
h.logger = ctx.Logger(h)
h.logger = ctx.Logger()
if h.Headers != nil {
err := h.Headers.Provision(ctx)
if err != nil {