Merge pull request #603 from pinheadmz/loghttp
http: identify log messages as node-http and wallet-http
This commit is contained in:
commit
4a634f1f73
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user