multi: remove PrefixLog

And instead use the new btclog Logger `WithPrefix` method.
This commit is contained in:
Elle Mouton committed 2024-11-27 10:44:32 +02:00
1 parent b98fc168ec
commit c2923e2214
9 files changed
+13 -203

No files matched your search

+6 -7
View File
@@ -11,7 +11,6 @@ import (
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btclog/v2"
"github.com/btcsuite/btcwallet/walletdb"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/clock"
"github.com/lightningnetwork/lnd/fn"
@@ -411,13 +410,13 @@ func (m *MissionController) initMissionControl(namespace string) (
}
mc := &MissionControl{
cfg: m.cfg,
state: newMissionControlState(cfg.MinFailureRelaxInterval),
store: store,
estimator: cfg.Estimator,
log: build.NewPrefixLog(
fmt.Sprintf("[%s]:", namespace), log,
cfg: m.cfg,
state: newMissionControlState(
cfg.MinFailureRelaxInterval,
),
store: store,
estimator: cfg.Estimator,
log: log.WithPrefix(fmt.Sprintf("[%s]:", namespace)),
onConfigUpdate: cfg.OnConfigUpdate,
}
+1 -2
View File
@@ -5,7 +5,6 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btclog/v2"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channeldb/models"
"github.com/lightningnetwork/lnd/lnutils"
@@ -232,7 +231,7 @@ func newPaymentSession(p *LightningPayment, selfNode route.Vertex,
pathFindingConfig: pathFindingConfig,
missionControl: missionControl,
minShardAmt: DefaultShardMinAmt,
log: build.NewPrefixLog(logPrefix, log),
log: log.WithPrefix(logPrefix),
}, nil
}