Log entire access config on exit

kivy_mainline_and_py3.8
Tyler Goodlet 2018-01-23 01:03:51 -05:00
parent f4a66dca47
commit e45cdf92f0
1 changed files with 4 additions and 6 deletions

View File

@ -1,14 +1,15 @@
""" """
Broker client-daemons and general back end machinery. Broker clients, daemons and general back end machinery.
""" """
import sys import sys
import trio import trio
from pprint import pformat
from .questrade import serve_forever from .questrade import serve_forever
from ..log import get_console_log from ..log import get_console_log
def main() -> None: def main() -> None:
log = get_console_log('INFO', name='questrade') log = get_console_log('info', name='questrade')
argv = sys.argv[1:] argv = sys.argv[1:]
refresh_token = None refresh_token = None
@ -21,7 +22,4 @@ def main() -> None:
except Exception as err: except Exception as err:
log.exception(err) log.exception(err)
else: else:
log.info( log.debug(f"Exiting with last access info:\n{pformat(client.access_data)}\n")
f"\nLast refresh_token: {client.access_data['refresh_token']}\n"
f"Last access_token: {client.access_data['access_token']}\n"
)