diff --git a/lib/node/http.js b/lib/node/http.js index c9261f33..98279d96 100644 --- a/lib/node/http.js +++ b/lib/node/http.js @@ -39,7 +39,7 @@ class HTTP extends Server { super(new HTTPOptions(options)); this.network = this.options.network; - this.logger = this.options.logger.context('http'); + this.logger = this.options.logger.context('node-http'); this.node = this.options.node; this.chain = this.node.chain; diff --git a/lib/node/rpc.js b/lib/node/rpc.js index 01ac7e0c..b9a19ddb 100644 --- a/lib/node/rpc.js +++ b/lib/node/rpc.js @@ -100,7 +100,7 @@ class RPC extends RPCBase { this.pool = node.pool; this.fees = node.fees; this.miner = node.miner; - this.logger = node.logger.context('rpc'); + this.logger = node.logger.context('node-rpc'); this.locker = new Lock(); this.mining = false; @@ -146,11 +146,6 @@ class RPC extends RPCBase { } } - handleError(err) { - this.logger.error('RPC internal error.'); - this.logger.error(err); - } - init() { this.add('stop', this.stop); this.add('help', this.help); diff --git a/lib/wallet/http.js b/lib/wallet/http.js index 5ca1056b..8fec9e53 100644 --- a/lib/wallet/http.js +++ b/lib/wallet/http.js @@ -42,7 +42,7 @@ class HTTP extends Server { super(new HTTPOptions(options)); this.network = this.options.network; - this.logger = this.options.logger.context('http'); + this.logger = this.options.logger.context('wallet-http'); this.wdb = this.options.node.wdb; this.rpc = this.options.node.rpc; diff --git a/lib/wallet/rpc.js b/lib/wallet/rpc.js index c74f4902..80deaa9e 100644 --- a/lib/wallet/rpc.js +++ b/lib/wallet/rpc.js @@ -89,7 +89,7 @@ class RPC extends RPCBase { this.wdb = node.wdb; this.network = node.network; - this.logger = node.logger.context('rpc'); + this.logger = node.logger.context('wallet-rpc'); this.client = node.client; this.locker = new Lock(); @@ -113,6 +113,10 @@ class RPC extends RPCBase { } } + handleCall(cmd, query) { + this.logger.debug('Handling RPC call: %s.', cmd.method); + } + init() { this.add('help', this.help); this.add('stop', this.stop);