From e18fdf28d27386c0a874a512d85a76c74bdf9d04 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Thu, 7 Nov 2024 20:53:05 +0100 Subject: [PATCH] chore: label implicit loggers this should help with debugging https://github.com/ipshipyard/p2p-forge/issues/8 on boxes with debug log level (and hide noise from normal users) --- core/node/libp2p/addrs.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/node/libp2p/addrs.go b/core/node/libp2p/addrs.go index acb5bb9d6e9..958d05bbbad 100644 --- a/core/node/libp2p/addrs.go +++ b/core/node/libp2p/addrs.go @@ -138,6 +138,13 @@ func P2PForgeCertMgr(repoPath string, cfg config.AutoTLS) interface{} { storagePath := filepath.Join(repoPath, "p2p-forge-certs") forgeLogger := logging.Logger("autotls").Desugar() + + // TODO: this should not be necessary, but we do it to help tracking + // down any race conditions causing + // https://github.com/ipshipyard/p2p-forge/issues/8 + certmagic.Default.Logger = forgeLogger.Named("default_fixme") + certmagic.DefaultACME.Logger = forgeLogger.Named("default_acme_client_fixme") + certStorage := &certmagic.FileStorage{Path: storagePath} certMgr, err := p2pforge.NewP2PForgeCertMgr( p2pforge.WithLogger(forgeLogger.Sugar()),