logging tidy up

This commit is contained in:
Steve Waterworth
2019-02-06 10:04:52 +00:00
parent a5375311a3
commit 7a76c9db36
4 changed files with 13 additions and 11 deletions

View File

@@ -135,7 +135,9 @@ publisher = Publisher(app.logger)
if __name__ == "__main__":
sh = logging.StreamHandler(sys.stdout)
sh.setLevel(logging.INFO)
app.logger.addHandler(sh)
fmt = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
#sh.setFormatter(fmt)
#app.logger.addHandler(sh)
app.logger.setLevel(logging.INFO)
app.logger.info('Payment gateway {}'.format(PAYMENT_GATEWAY))
port = int(os.getenv("SHOP_PAYMENT_PORT", "8080"))