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