From 52b8e1903f742665336d6b440febf99589cde620 Mon Sep 17 00:00:00 2001 From: "Rune T. Aune" Date: Thu, 19 Nov 2015 14:08:20 -0600 Subject: [PATCH] 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. --- chain/chain.go | 1 - log.go | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/chain/chain.go b/chain/chain.go index 28a8a65..80ae878 100644 --- a/chain/chain.go +++ b/chain/chain.go @@ -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: diff --git a/log.go b/log.go index 2757259..1c61283 100644 --- a/log.go +++ b/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) } }