EVAL/logger.py

14 lines
306 B
Python
Raw Normal View History

2023-03-22 00:34:52 +00:00
import logging
from env import settings
logger = logging.getLogger()
formatter = logging.Formatter("%(message)s")
ch = logging.StreamHandler()
ch.setFormatter(formatter)
logger.addHandler(ch)
2023-03-22 00:34:52 +00:00
if settings["LOG_LEVEL"] == "DEBUG":
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)