From 71fb4ab6716b16931bb7ea234001d426ba18545f Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Fri, 8 Aug 2025 11:49:58 -0400 Subject: [PATCH] docs(client/logging): reflect corrected default log level mapping (#1403) Co-authored-by: opencode --- docs/clients/logging.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/clients/logging.mdx b/docs/clients/logging.mdx index 84b5798f6..ffebdf87f 100644 --- a/docs/clients/logging.mdx +++ b/docs/clients/logging.mdx @@ -100,12 +100,12 @@ async def detailed_log_handler(message: LogMessage): ## Default Log Handling -If you don't provide a custom `log_handler`, FastMCP uses a default handler that emits a DEBUG-level FastMCP log for every log message received from the server, which is useful for visibility without polluting your own logs. +If you don't provide a custom `log_handler`, FastMCP's default handler routes server logs to the appropriate Python logging levels. The MCP levels are mapped as follows: `notice` → INFO; `alert` and `emergency` → CRITICAL. If the server includes a logger name, it is prefixed in the message, and any `extra` data is forwarded via the logging `extra` parameter. ```python client = Client("my_mcp_server.py") async with client: - # Server logs will be emitted at DEBUG level automatically + # Server logs are forwarded at their proper severity (DEBUG/INFO/WARNING/ERROR/CRITICAL) await client.call_tool("some_tool") ```