about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-12-09 18:29:42 +0100
committerAlan Pearce2024-12-09 18:29:42 +0100
commitb8377dd9585af5dec8aee7baea91d1c97a17e44b (patch)
treebbfb3383c35cd62a6bd4ba5874b08ed2680a469c
parenta7b9a089b0ec645fec1ee21e0fb48194483957a2 (diff)
downloadwebsite-b8377dd9585af5dec8aee7baea91d1c97a17e44b.tar.lz
website-b8377dd9585af5dec8aee7baea91d1c97a17e44b.tar.zst
website-b8377dd9585af5dec8aee7baea91d1c97a17e44b.zip
set certmagic logger properly
-rw-r--r--internal/server/tls.go5
1 files changed, 2 insertions, 3 deletions
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,
 			},
 		}