Jeremiah Lowin opencode commited on
Commit
2651ffb
·
unverified ·
1 Parent(s): fbfd90f

docs(client/logging): reflect corrected default log level mapping (#1403)

Browse files
Files changed (1) hide show
  1. docs/clients/logging.mdx +2 -2
docs/clients/logging.mdx CHANGED
@@ -100,12 +100,12 @@ async def detailed_log_handler(message: LogMessage):
100
 
101
  ## Default Log Handling
102
 
103
- 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.
104
 
105
  ```python
106
  client = Client("my_mcp_server.py")
107
 
108
  async with client:
109
- # Server logs will be emitted at DEBUG level automatically
110
  await client.call_tool("some_tool")
111
  ```
 
100
 
101
  ## Default Log Handling
102
 
103
+ 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.
104
 
105
  ```python
106
  client = Client("my_mcp_server.py")
107
 
108
  async with client:
109
+ # Server logs are forwarded at their proper severity (DEBUG/INFO/WARNING/ERROR/CRITICAL)
110
  await client.call_tool("some_tool")
111
  ```