changed noisy logging to debug
This commit is contained in:
parent
2abfd41eb1
commit
1e65c65670
1 changed files with 6 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue