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 committed 2025-09-05 18:20:51 -07:00
1 parent 77f2d8a572
commit 2cc4079a0e
6 files changed
+15 -19

No files matched your search

+1 -2
View File
@@ -13,7 +13,6 @@ import (
"github.com/btcsuite/btcd/btcec/v2/ecdsa"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/wire"
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/clock"
@@ -1625,7 +1624,7 @@ out:
}
log.Debugf("Received outside contract resolution, "+
"mapping to: %v", spew.Sdump(pkt))
"mapping to: %v", lnutils.SpewLogClosure(pkt))
// We don't check the error, as the only failure we can
// encounter is due to the circuit already being