add logging to examples (override uvicorn's default logger)

This commit is contained in:
Shahar Abramov
2025-04-08 19:23:16 +03:00
parent 7f543d9423
commit 1f325f2975
3 changed files with 46 additions and 0 deletions

View File

@@ -3,10 +3,14 @@ Simple example of using FastAPI-MCP to add an MCP server to a FastAPI app.
"""
from examples.apps import items
from examples.setup import setup_logging
from fastapi_mcp import FastApiMCP
setup_logging()
# Add MCP server to the FastAPI app
mcp = FastApiMCP(
items.app,