π The fast, Pythonic way to build MCP servers and clients.
fix: use stderr for logging
Ben Sully4e4436687b00
diff --git a/src/fastmcp/utilities/logging.py b/src/fastmcp/utilities/logging.pyindex e2dd5f45e..1535d1e56 100644--- a/src/fastmcp/utilities/logging.py+++ b/src/fastmcp/utilities/logging.py@@ -3,6 +3,7 @@import loggingfrom typing import Literal+from rich.console import Consolefrom rich.logging import RichHandler@@ -27,5 +28,7 @@ def configure_logging(level: the log level to use"""logging.basicConfig(- level=level, format="%(message)s", handlers=[RichHandler(rich_tracebacks=True)]+ level=level,+ format="%(message)s",+ handlers=[RichHandler(console=Console(stderr=True), rich_tracebacks=True)],)