fix logger

This commit is contained in:
Thephaseless 2024-07-24 20:41:15 +00:00
parent 3f01443b7c
commit fc0ceec83d

View File

@ -1,3 +1,7 @@
import logging
import os
logger = logging.getLogger("uvicorn.error")
logger.setLevel(os.getenv("LOG_LEVEL") or logging.INFO)
if len(logger.handlers) == 0:
logger.addHandler(logging.StreamHandler())