EVAL/logger.py

15 lines
307 B
Python
Raw Normal View History

2023-03-22 00:34:52 +00:00
import logging
2023-04-03 07:43:34 +00:00
2023-03-22 00:34:52 +00:00
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)