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)
Marcin Rataj committed
Nov 7, 2024 at 20:53 UTC
e18fdf28d27386c0a874a512d85a76c74bdf9d04
1 file changed
+7
core/node/libp2p/addrs.go
+7
@@ -138,6 +138,13 @@ func P2PForgeCertMgr(repoPath string, cfg config.AutoTLS) interface{} {
138
storagePath := filepath.Join(repoPath, "p2p-forge-certs")
139
140
forgeLogger := logging.Logger("autotls").Desugar()
141
+
142
+ // TODO: this should not be necessary, but we do it to help tracking
143
+ // down any race conditions causing
144
+ // https://github.com/ipshipyard/p2p-forge/issues/8
145
+ certmagic.Default.Logger = forgeLogger.Named("default_fixme")
146
+ certmagic.DefaultACME.Logger = forgeLogger.Named("default_acme_client_fixme")
147
+
148
certStorage := &certmagic.FileStorage{Path: storagePath}
149
certMgr, err := p2pforge.NewP2PForgeCertMgr(
150
p2pforge.WithLogger(forgeLogger.Sugar()),