about summary refs log tree commit diff stats
path: root/internal/server/tls.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/tls.go')
-rw-r--r--internal/server/tls.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/server/tls.go b/internal/server/tls.go
index 6c48f86..655455c 100644
--- a/internal/server/tls.go
+++ b/internal/server/tls.go
@@ -8,7 +8,6 @@ import (
 	"strconv"
 
 	"go.alanpearce.eu/website/internal/listenfd"
-	"go.alanpearce.eu/website/internal/log"
 
 	"github.com/ardanlabs/conf/v3"
 	"github.com/caddyserver/caddy/v2"
@@ -27,10 +26,10 @@ type redisConfig struct {
 
 func (s *Server) serveTLS() (err error) {
 	var issuer *certmagic.ACMEIssuer
+	log := s.log.Named("tls")
 
 	// setting cfg.Logger is too late somehow
-	certmagic.Default.Logger = log.GetLogger().
-		Named("certmagic")
+	certmagic.Default.Logger = log.GetLogger().Named("certmagic")
 	cfg := certmagic.NewDefault()
 	cfg.DefaultServerName = s.config.Domains[0]
 
@@ -97,6 +96,7 @@ func (s *Server) serveTLS() (err error) {
 	ln, err := listenfd.GetListener(
 		1,
 		net.JoinHostPort(s.runtimeConfig.ListenAddress, strconv.Itoa(s.runtimeConfig.Port)),
+		log.Named("listenfd"),
 	)
 	if err != nil {
 		return errors.Wrap(err, "could not bind plain socket")
@@ -127,6 +127,7 @@ func (s *Server) serveTLS() (err error) {
 		0,
 		net.JoinHostPort(s.runtimeConfig.ListenAddress, strconv.Itoa(s.runtimeConfig.TLSPort)),
 		tlsConfig,
+		log.Named("listenfd"),
 	)
 	if err != nil {
 		return errors.Wrap(err, "could not bind tls socket")