add silent option.

This commit is contained in:
Christopher Jeffrey 2014-10-29 16:01:54 -07:00
parent 304d9d6e77
commit 8e09b40257
1 changed files with 2 additions and 0 deletions

View File

@ -371,6 +371,7 @@ Bitcoin.prototype.getMiningInfo = function() {
Bitcoin.prototype.log =
Bitcoin.prototype.info = function() {
if (this.options.silent) return;
if (typeof arguments[0] !== 'string') {
var out = util.inspect(arguments[0], null, 20, true);
return process.stdout.write('bitcoind.js: ' + out + '\n');
@ -380,6 +381,7 @@ Bitcoin.prototype.info = function() {
};
Bitcoin.prototype.error = function() {
if (this.options.silent) return;
if (typeof arguments[0] !== 'string') {
var out = util.inspect(arguments[0], null, 20, true);
return process.stderr.write('bitcoind.js: ' + out + '\n');