enhance logging messages

This commit is contained in:
gcarq 2017-11-10 17:56:03 +01:00
parent e01c85bb3a
commit b709ccbf53

View File

@ -40,7 +40,10 @@ def _process() -> bool:
Trade.session.add(trade) Trade.session.add(trade)
state_changed = True state_changed = True
else: else:
logger.info('Got no buy signal...') logger.info(
'Checked all whitelisted currencies. '
'Found no suitable entry positions for buying. Will keep looking ...'
)
except ValueError: except ValueError:
logger.exception('Unable to create trade') logger.exception('Unable to create trade')
@ -83,7 +86,10 @@ def close_trade_if_fulfilled(trade: Trade) -> bool:
and trade.close_rate is not None \ and trade.close_rate is not None \
and trade.open_order_id is None: and trade.open_order_id is None:
trade.is_open = False trade.is_open = False
logger.info('No open orders found and trade is fulfilled. Marking %s as closed ...', trade) logger.info(
'Marking %s as closed as the trade is fulfilled and found no open orders for it.',
trade
)
return True return True
return False return False