import uvicorn import logging import sys from app.core.app import create_app # Configure logging logging.basicConfig( level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", handlers=[ logging.StreamHandler(sys.stdout) ] ) logger = logging.getLogger(__name__) # Create FastAPI application logger.info("Initializing FastAPI application") try: app = create_app() logger.info("FastAPI application initialized successfully") except Exception as e: logger.error(f"Failed to initialize FastAPI application: {str(e)}") # Re-raise the exception for supervisor to see raise if __name__ == "__main__": uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)