diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/notify_bowdst.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/python/notify_bowdst.py b/python/notify_bowdst.py index 616853e5..75e1a61f 100644 --- a/python/notify_bowdst.py +++ b/python/notify_bowdst.py @@ -9,11 +9,10 @@ from serenitas.utils.exchange import ExchangeMessage from serenitas.utils import SerenitasFileHandler import logging -fh = SerenitasFileHandler("mismatched_trades.log") logger = logging.getLogger(__name__) -if logger.hasHandlers(): - logger.handlers.clear() -logger.addHandler(fh) +if not logger.hasHandlers(): + fh = SerenitasFileHandler("mismatched_trades.log") + logger.addHandler(fh) logger.setLevel(logging.WARNING) conn = dbconn("dawndb") @@ -52,7 +51,7 @@ for row in inaccurate_balances.itertuples(): date = data.name globeop_notional = data.globeop_notional except IndexError: - logger.info("No matches") + logger.warning("No matches") continue buf = StringIO() @@ -67,7 +66,7 @@ for row in inaccurate_balances.itertuples(): print( f"Mismatch balance {row.security_desc} {row.globeop_notional} :{row.db_notional} Trades Recently" ) - logger.error( + logger.warning( f"Mismatch balance {row.security_desc} {row.globeop_notional} :{row.db_notional} Trades Recently" ) continue |
