use log level warning in fastapi

This commit is contained in:
Arthur Lu
2025-02-22 07:46:22 +00:00
committed by root
parent dee97f09c2
commit 8db1197422
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import os
import uvicorn
from database import init_db # Ensure database initializes before starting FastAPI
import logging
os.environ["PYTHONDONTWRITEBYTECODE"] = "1"
@@ -9,4 +10,4 @@ if __name__ == "__main__":
init_db()
# Start the FastAPI server with custom options
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True, workers=2)
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True, workers=2, log_level=logging.WARNING)