Skip to content

Commit

Permalink
lnwallet: fix loggings
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Dec 10, 2024
1 parent f886f30 commit 6b53911
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 8 additions & 0 deletions lnwallet/btcwallet/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ package btcwallet
import (
"github.com/btcsuite/btclog/v2"
"github.com/lightningnetwork/lnd/build"

"github.com/btcsuite/btcwallet/chain"
basewallet "github.com/btcsuite/btcwallet/wallet"
"github.com/btcsuite/btcwallet/wtxmgr"
)

// Subsystem defines the logging code for this subsystem.
Expand All @@ -29,4 +33,8 @@ func DisableLog() {
// btclog.
func UseLogger(logger btclog.Logger) {
log = logger

basewallet.UseLogger(logger)
wtxmgr.UseLogger(logger)
chain.UseLogger(logger)
}
6 changes: 0 additions & 6 deletions lnwallet/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package lnwallet

import (
"github.com/btcsuite/btclog/v2"
"github.com/btcsuite/btcwallet/chain"
btcwallet "github.com/btcsuite/btcwallet/wallet"
"github.com/btcsuite/btcwallet/wtxmgr"
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
)
Expand All @@ -31,8 +28,5 @@ func DisableLog() {
func UseLogger(logger btclog.Logger) {
walletLog = logger

btcwallet.UseLogger(logger)
wtxmgr.UseLogger(logger)
chain.UseLogger(logger)
chainfee.UseLogger(logger)
}

0 comments on commit 6b53911

Please sign in to comment.