Merge pull request #603 from pinheadmz/loghttp

http: identify log messages as node-http and wallet-http
This commit is contained in:
Braydon Fuller 2019-02-07 14:20:12 -08:00
commit 4a634f1f73
No known key found for this signature in database
GPG Key ID: F24F232D108B3AD4
4 changed files with 8 additions and 9 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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);