diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 60a0376..1f109bc 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -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())