diff --git a/parma_mining/discord/api/main.py b/parma_mining/discord/api/main.py index b5a0a21..962af38 100644 --- a/parma_mining/discord/api/main.py +++ b/parma_mining/discord/api/main.py @@ -13,7 +13,15 @@ ServersRequest, ) -logging.basicConfig(level=logging.INFO) +env = os.getenv("env", "local") + +if env == "prod": + logging.basicConfig(level=logging.INFO) +elif env in ["staging", "local"]: + logging.basicConfig(level=logging.DEBUG) +else: + logging.warning(f"Unknown environment '{env}'. Defaulting to INFO level.") + logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__)