Skip to content

Commit

Permalink
chore: label implicit loggers
Browse files Browse the repository at this point in the history
this should help with debugging
ipshipyard/p2p-forge#8
on boxes with debug log level
(and hide noise from normal users)
  • Loading branch information
lidel committed Nov 7, 2024
1 parent 5d88447 commit e18fdf2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/node/libp2p/addrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down

0 comments on commit e18fdf2

Please sign in to comment.