about summary refs log tree commit diff stats
path: root/internal/listenfd
diff options
context:
space:
mode:
authorAlan Pearce2024-06-29 21:27:35 +0200
committerAlan Pearce2024-06-29 21:27:35 +0200
commit973fa31b6743a3ea84c86ab7671349cc70a69142 (patch)
tree4c583c8ef5e7a9117fe997a4f861ae7466fa0864 /internal/listenfd
parent7b82d3ef3e93c0c8efe489d6b11b30f092667bf2 (diff)
downloadwebsite-973fa31b6743a3ea84c86ab7671349cc70a69142.tar.lz
website-973fa31b6743a3ea84c86ab7671349cc70a69142.tar.zst
website-973fa31b6743a3ea84c86ab7671349cc70a69142.zip
enable filtered debug logging via DEBUG="component.*"
Diffstat (limited to 'internal/listenfd')
-rw-r--r--internal/listenfd/listenfd.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/listenfd/listenfd.go b/internal/listenfd/listenfd.go
index 4e8c007..8c723eb 100644
--- a/internal/listenfd/listenfd.go
+++ b/internal/listenfd/listenfd.go
@@ -13,7 +13,7 @@ import (
 
 const fdStart = 3
 
-func GetListener(i uint64, addr string) (l net.Listener, err error) {
+func GetListener(i uint64, addr string, log *log.Logger) (l net.Listener, err error) {
 	l, err = getFDSocket(i)
 	if err != nil {
 		log.Warn("could not create listener from listenfd", "error", err)
@@ -30,8 +30,13 @@ func GetListener(i uint64, addr string) (l net.Listener, err error) {
 	return
 }
 
-func GetListenerTLS(i uint64, addr string, config *tls.Config) (l net.Listener, err error) {
-	l, err = GetListener(i, addr)
+func GetListenerTLS(
+	i uint64,
+	addr string,
+	config *tls.Config,
+	log *log.Logger,
+) (l net.Listener, err error) {
+	l, err = GetListener(i, addr, log)
 	if err != nil {
 		return nil, err
 	}