Add the chain subsystem logger to btcrpcclient.
Logging from btcrpcclient is currently not possible to set, and defaults to nothing. Letting it inherit chain's logger can greatly simplify debugging of connectivity issues. Also remove a now redundant log message upon connecting to btcd.
This commit is contained in:
parent
6ba74e6730
commit
52b8e1903f
2 changed files with 2 additions and 1 deletions
|
@ -224,7 +224,6 @@ func parseBlock(block *btcjson.BlockDetails) (*wtxmgr.BlockMeta, error) {
|
|||
}
|
||||
|
||||
func (c *Client) onClientConnect() {
|
||||
log.Info("Established websocket RPC connection to btcd")
|
||||
select {
|
||||
case c.enqueueNotification <- ClientConnected{}:
|
||||
case <-c.quit:
|
||||
|
|
2
log.go
2
log.go
|
@ -21,6 +21,7 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/btcsuite/btclog"
|
||||
"github.com/btcsuite/btcrpcclient"
|
||||
"github.com/btcsuite/btcwallet/chain"
|
||||
"github.com/btcsuite/btcwallet/wallet"
|
||||
"github.com/btcsuite/btcwallet/wtxmgr"
|
||||
|
@ -92,6 +93,7 @@ func useLogger(subsystemID string, logger btclog.Logger) {
|
|||
case "CHNS":
|
||||
chainLog = logger
|
||||
chain.UseLogger(logger)
|
||||
btcrpcclient.UseLogger(logger)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue