Browse Source

promote insufficient liquidity error message to warning

command line taker-info-callback is info level log message.
master
AdamISZ 8 years ago
parent
commit
7860fe1a36
No known key found for this signature in database
GPG Key ID: B3AE09F1E9A3197A
  1. 2
      jmclient/jmclient/support.py
  2. 2
      jmclient/jmclient/taker.py

2
jmclient/jmclient/support.py

@ -221,7 +221,7 @@ def choose_orders(offers, cj_amount, n, chooseOrdersBy, ignored_makers=None,
counterparties = set([o['counterparty'] for o in orders]) counterparties = set([o['counterparty'] for o in orders])
if n > len(counterparties): if n > len(counterparties):
log.debug(('ERROR not enough liquidity in the orderbook n=%d ' log.warn(('ERROR not enough liquidity in the orderbook n=%d '
'suitable-counterparties=%d amount=%d totalorders=%d') % 'suitable-counterparties=%d amount=%d totalorders=%d') %
(n, len(counterparties), cj_amount, len(orders))) (n, len(counterparties), cj_amount, len(orders)))
# TODO handle not enough liquidity better, maybe an Exception # TODO handle not enough liquidity better, maybe an Exception

2
jmclient/jmclient/taker.py

@ -92,7 +92,7 @@ class Taker(object):
self.on_finished_callback = callbacks[2] self.on_finished_callback = callbacks[2]
def default_taker_info_callback(self, infotype, msg): def default_taker_info_callback(self, infotype, msg):
jlog.debug(infotype + ":" + msg) jlog.info(infotype + ":" + msg)
def add_ignored_makers(self, makers): def add_ignored_makers(self, makers):
self.ignored_makers.extend(makers) self.ignored_makers.extend(makers)

Loading…
Cancel
Save