node: log intro with config path

This commit is contained in:
Braydon Fuller 2016-04-07 10:14:34 -04:00
parent 0f24dd5f49
commit 18310268a5
4 changed files with 12 additions and 2 deletions

View File

@ -40,6 +40,7 @@ function Node(config) {
if(!(this instanceof Node)) {
return new Node(config);
}
this.configPath = config.path;
this.errors = errors;
this.log = log;
this.network = null;
@ -215,6 +216,12 @@ Node.prototype._startService = function(serviceInfo, callback) {
};
Node.prototype._logTitle = function() {
console.log('\n\n\n\n\n\n\n\n\n\n\n\n');
log.info('Using config:', this.configPath);
};
/**
* Will start all running services in the order based on the dependency chain.
* @param {Function} callback - Called when all services are started
@ -223,6 +230,8 @@ Node.prototype.start = function(callback) {
var self = this;
var servicesOrder = this.getServiceOrder();
self._logTitle();
async.eachSeries(
servicesOrder,
function(service, next) {

View File

@ -21,7 +21,7 @@ function getDefaultBaseConfig(options) {
servicesConfig: {
bitcoind: {
datadir: options.datadir || path.resolve(process.env.HOME, '.bitcoin'),
exec: path.resolve(__dirname, '../../dist/bitcoind')
exec: path.resolve(__dirname, '../../bin/bitcoind')
}
}
}

View File

@ -37,7 +37,7 @@ function getDefaultConfig(options) {
servicesConfig: {
bitcoind: {
datadir: path.resolve(defaultPath, './data'),
exec: path.resolve(__dirname, '../../dist/bitcoind')
exec: path.resolve(__dirname, '../../bin/bitcoind')
}
}
};

View File

@ -200,6 +200,7 @@ function start(options) {
servicesPath = options.path; // defaults to the same directory
}
fullConfig.path = path.resolve(options.path, './bitcore-node.json');
fullConfig.services = start.setupServices(require, servicesPath, options.config);
var node = new BitcoreNode(fullConfig);