Byparr/src/utils/__init__.py

8 lines
203 B
Python
Raw Normal View History

2024-07-24 13:57:40 +00:00
import logging
2024-07-24 20:41:15 +00:00
import os
2024-07-24 13:57:40 +00:00
logger = logging.getLogger("uvicorn.error")
2024-07-24 20:41:15 +00:00
logger.setLevel(os.getenv("LOG_LEVEL") or logging.INFO)
if len(logger.handlers) == 0:
logger.addHandler(logging.StreamHandler())