diff options
author | Alan Pearce | 2024-12-09 18:29:42 +0100 |
---|---|---|
committer | Alan Pearce | 2024-12-09 18:29:42 +0100 |
commit | b8377dd9585af5dec8aee7baea91d1c97a17e44b (patch) | |
tree | bbfb3383c35cd62a6bd4ba5874b08ed2680a469c /internal/server | |
parent | a7b9a089b0ec645fec1ee21e0fb48194483957a2 (diff) | |
download | website-b8377dd9585af5dec8aee7baea91d1c97a17e44b.tar.lz website-b8377dd9585af5dec8aee7baea91d1c97a17e44b.tar.zst website-b8377dd9585af5dec8aee7baea91d1c97a17e44b.zip |
set certmagic logger properly
Diffstat (limited to 'internal/server')
-rw-r--r-- | internal/server/tls.go | 5 |
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, }, } |