changed noisy logging to debug

This commit is contained in:
Josh Harvey 2014-04-27 23:38:19 -04:00
parent 2abfd41eb1
commit 1e65c65670

View file

@ -17,7 +17,7 @@ var Trader = module.exports = function (db) {
this.db = db; this.db = db;
this.rates = {}; this.rates = {};
this.logger = new (winston.Logger)({ this.logger = new (winston.Logger)({
transports: [new (winston.transports.Console)({level: 'info'})] transports: [new (winston.transports.Console)({level: 'debug'})]
}); });
this._tradeQueue = []; this._tradeQueue = [];
@ -230,24 +230,24 @@ Trader.prototype.trade = function (rec, deviceFingerprint) {
Trader.prototype.executeTrades = function () { Trader.prototype.executeTrades = function () {
if (!this.tradeExchange) return; if (!this.tradeExchange) return;
this.logger.info('checking for trades'); this.logger.debug('checking for trades');
var trade = this._consolidateTrades(); var trade = this._consolidateTrades();
this.logger.info('consolidated: ', JSON.stringify(trade)); this.logger.debug('consolidated: ', JSON.stringify(trade));
if (trade.fiat === 0) { if (trade.fiat === 0) {
this.logger.info('rejecting 0 trade'); this.logger.debug('rejecting 0 trade');
return; return;
} }
if (trade.fiat < this.config.exchanges.settings.minimumTradeFiat) { if (trade.fiat < this.config.exchanges.settings.minimumTradeFiat) {
// throw it back in the water // throw it back in the water
this.logger.info('reject fiat too small'); this.logger.debug('reject fiat too small');
this._tradeQueue.unshift(trade); this._tradeQueue.unshift(trade);
return; return;
} }
this.logger.info('making a trade: %d', trade.satoshis / Math.pow(10, 8)); this.logger.debug('making a trade: %d', trade.satoshis / Math.pow(10, 8));
var self = this; var self = this;
this._purchase(trade, function (err) { this._purchase(trade, function (err) {
if (err) self.logger.error(err); if (err) self.logger.error(err);