From e45cdf92f055135f30fda43bd4adbd69dc78da4f Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 23 Jan 2018 01:03:51 -0500 Subject: [PATCH] Log entire access config on exit --- piker/brokers/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/piker/brokers/__init__.py b/piker/brokers/__init__.py index f2c6409c..a78fb558 100644 --- a/piker/brokers/__init__.py +++ b/piker/brokers/__init__.py @@ -1,14 +1,15 @@ """ -Broker client-daemons and general back end machinery. +Broker clients, daemons and general back end machinery. """ import sys import trio +from pprint import pformat from .questrade import serve_forever from ..log import get_console_log def main() -> None: - log = get_console_log('INFO', name='questrade') + log = get_console_log('info', name='questrade') argv = sys.argv[1:] refresh_token = None @@ -21,7 +22,4 @@ def main() -> None: except Exception as err: log.exception(err) else: - log.info( - f"\nLast refresh_token: {client.access_data['refresh_token']}\n" - f"Last access_token: {client.access_data['access_token']}\n" - ) + log.debug(f"Exiting with last access info:\n{pformat(client.access_data)}\n")