set certmagic logger properly
Alan Pearce alan@alanpearce.eu
Mon, 09 Dec 2024 18:29:42 +0100
1 files changed, 2 insertions(+), 3 deletions(-)
jump to
M internal/server/tls.go → internal/server/tls.go
@@ -33,9 +33,8 @@ wildcardDomain := "*." + s.config.WildcardDomain certificateDomains := slices.Clone(s.config.Domains) - // setting cfg.Logger is too late somehow - certmagic.Default.Logger = log.GetLogger().Named("certmagic") cfg := certmagic.NewDefault() + cfg.Logger = log.GetLogger().Named("certmagic") acme := certmagic.DefaultACME acme.Agreed = true @@ -82,7 +81,7 @@ acme.DNS01Solver = &certmagic.DNS01Solver{ DNSManager: certmagic.DNSManager{ DNSProvider: pdns, - Logger: certmagic.Default.Logger, + Logger: cfg.Logger, }, }