From b8377dd9585af5dec8aee7baea91d1c97a17e44b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 9 Dec 2024 18:29:42 +0100 Subject: set certmagic logger properly --- internal/server/tls.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/server/tls.go') diff --git a/internal/server/tls.go b/internal/server/tls.go index dd69a44..2e187aa 100644 --- a/internal/server/tls.go +++ b/internal/server/tls.go @@ -33,9 +33,8 @@ func (s *Server) serveTLS() (err error) { 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 @@ func (s *Server) serveTLS() (err error) { acme.DNS01Solver = &certmagic.DNS01Solver{ DNSManager: certmagic.DNSManager{ DNSProvider: pdns, - Logger: certmagic.Default.Logger, + Logger: cfg.Logger, }, } -- cgit 1.4.1