import logging import os import sys def setup(): log_format = "%(levelname)s %(asctime)s: %(message)s" logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"), format=log_format, stream=sys.stdout)