~emersion/public-inbox

tlstunnel: Enable certmagic logging v1 APPLIED

delthas: 1
 Enable certmagic logging

 2 files changed, 15 insertions(+), 1 deletions(-)
#329707 .build.yml failed
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/public-inbox/patches/14550/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH tlstunnel] Enable certmagic logging Export this patch

---
 go.mod    |  3 ++-
 server.go | 13 +++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/go.mod b/go.mod
index df497b6..c2d4b9f 100644
--- a/go.mod
+++ b/go.mod
@@ -7,12 +7,13 @@ require (
	github.com/caddyserver/certmagic v0.12.0
	github.com/klauspost/cpuid v1.3.1 // indirect
	github.com/libdns/digitalocean v0.0.0-20200817185712-f11d70f2506c
	github.com/mholt/acmez v0.1.1
	github.com/miekg/dns v1.1.31 // indirect
	github.com/pires/go-proxyproto v0.2.1-0.20201009121050-c24efa3e2d93
	github.com/pkg/errors v0.9.1 // indirect
	github.com/stretchr/testify v1.6.1 // indirect
	go.uber.org/multierr v1.6.0 // indirect
	go.uber.org/zap v1.16.0 // indirect
	go.uber.org/zap v1.16.0
	golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect
	golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
	golang.org/x/net v0.0.0-20201009032441-dbdefad45b89 // indirect
diff --git a/server.go b/server.go
index a1a1161..16fad61 100644
--- a/server.go
+++ b/server.go
@@ -9,8 +9,12 @@ import (
	"net"
	"strings"

	"go.uber.org/zap"

	"git.sr.ht/~emersion/go-scfg"

	"github.com/caddyserver/certmagic"
	"github.com/mholt/acmez"
	"github.com/pires/go-proxyproto"
	"github.com/pires/go-proxyproto/tlvparse"
)
@@ -36,6 +40,15 @@ func NewServer() *Server {
	cfg.Issuer = mgr
	cfg.Revoker = mgr

	loggerCfg := zap.NewDevelopmentConfig()
	loggerCfg.Level = zap.NewAtomicLevelAt(zap.InfoLevel)
	logger, err := loggerCfg.Build()
	if err != nil {
		log.Fatalf("failed to initialize zap logger: %v", err)
	}
	cfg.Logger = logger
	mgr.Logger = logger

	return &Server{
		Listeners:   make(map[string]*Listener),
		ACMEManager: mgr,
-- 
2.17.1
builds.sr.ht
tlstunnel/patches/.build.yml: FAILED in 22s

[Enable certmagic logging][0] from [delthas][1]

[0]: https://lists.sr.ht/~emersion/public-inbox/patches/14550
[1]: mailto:delthas@dille.cc

✗ #329707 FAILED tlstunnel/patches/.build.yml https://builds.sr.ht/~emersion/job/329707
Fixed the merge conflicts, removed the extra acmez import, and tried a
different default to partially workaround zap's retarded output format.

Pushed, thanks!