1# https://stackoverflow.com/a/14058475
2import logging
3import sys
4
5root = logging.getLogger()
6root.setLevel(logging.DEBUG)
7
8handler = logging.StreamHandler(sys.stdout)
9handler.setLevel(logging.DEBUG)
10formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
11handler.setFormatter(formatter)
12root.addHandler(handler)