routing+htlcswitch+discovery+peer+netann: optimize debug logging with lazy evaluation

In this commit, we update the network and routing layer components to use
lnutils.SpewLogClosure for debug logging.
This commit is contained in:
Olaoluwa Osuntokun
2025-09-01 16:28:55 -07:00
parent 77f2d8a572
commit 2cc4079a0e
6 changed files with 15 additions and 19 deletions

View File

@@ -13,7 +13,6 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/amp"
"github.com/lightningnetwork/lnd/clock"
"github.com/lightningnetwork/lnd/fn/v2"
@@ -958,7 +957,8 @@ func spewPayment(payment *LightningPayment) lnutils.LogClosure {
}
p := *payment
p.RouteHints = routeHints
return spew.Sdump(p)
return lnutils.SpewLogClosure(p)()
})
}