EVAL/logger.py
2023-04-03 07:43:34 +00:00

15 lines
307 B
Python

import logging
from env import settings
logger = logging.getLogger()
formatter = logging.Formatter("%(message)s")
ch = logging.StreamHandler()
ch.setFormatter(formatter)
logger.addHandler(ch)
if settings["LOG_LEVEL"] == "DEBUG":
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)