1
mirror of https://github.com/ThePhaseless/Byparr.git synced 2025-03-16 02:00:21 +08:00

fix logger

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

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