all repos — website @ 7b82d3ef3e93c0c8efe489d6b11b30f092667bf2

My website

pass logger to certmagic
Alan Pearce alan@alanpearce.eu
Sat, 29 Jun 2024 20:47:33 +0200
commit

7b82d3ef3e93c0c8efe489d6b11b30f092667bf2

parent

0e50089ea4b4bbd89c58c379b252baa2d09853ed

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M internal/server/tls.gointernal/server/tls.go
@@ -28,6 +28,9 @@ func (s *Server) serveTLS() (err error) {
 	var issuer *certmagic.ACMEIssuer
 
+	// setting cfg.Logger is too late somehow
+	certmagic.Default.Logger = log.GetLogger().
+		Named("certmagic")
 	cfg := certmagic.NewDefault()
 	cfg.DefaultServerName = s.config.Domains[0]