Skip to content

Commit e18fdf2

Browse files
committed
chore: label implicit loggers
this should help with debugging ipshipyard/p2p-forge#8 on boxes with debug log level (and hide noise from normal users)
1 parent 5d88447 commit e18fdf2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/node/libp2p/addrs.go

+7
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ func P2PForgeCertMgr(repoPath string, cfg config.AutoTLS) interface{} {
138138
storagePath := filepath.Join(repoPath, "p2p-forge-certs")
139139

140140
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+
141148
certStorage := &certmagic.FileStorage{Path: storagePath}
142149
certMgr, err := p2pforge.NewP2PForgeCertMgr(
143150
p2pforge.WithLogger(forgeLogger.Sugar()),

0 commit comments

Comments
 (0)