Implemented timestamps in logs

This commit is contained in:
jeancf 2021-06-01 15:49:11 +02:00
parent 29629e2785
commit c688035fd0

View File

@ -275,8 +275,13 @@ def main(argv):
# pass
# Setup logging to file
# TODO Add timestamps
logging.basicConfig(filename=twit_account + '.log', level=logging.INFO)
logging.basicConfig(
filename=twit_account + '.log',
level=logging.INFO,
fmt='%(asctime)s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S',
)
logging.info('Running with the following parameters:')
logging.info(' -t ' + twit_account)
logging.info(' -i ' + mast_instance)