Gate log notifications on the per-request log-level opt-in at 2026-07-28 (#3198)
This commit is contained in:
parent
b61ce388dd
commit
89c5e700f2
2 changed files with 406 additions and 31 deletions
|
|
@ -50,7 +50,7 @@ async def test_context_logging_helpers_send_log_notifications(connect: Connect)
|
|||
async def collect(params: LoggingMessageNotificationParams) -> None:
|
||||
received.append(params)
|
||||
|
||||
async with connect(mcp, logging_callback=collect) as client:
|
||||
async with connect(mcp, logging_callback=collect, log_level="debug") as client:
|
||||
result = await client.call_tool("narrate", {})
|
||||
advertised_logging = client.server_capabilities.logging
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ async def test_report_progress_without_a_progress_token_sends_nothing(connect: C
|
|||
async def collect(message: IncomingMessage) -> None:
|
||||
received.append(message)
|
||||
|
||||
async with connect(mcp, message_handler=collect) as client:
|
||||
async with connect(mcp, message_handler=collect, log_level="debug") as client:
|
||||
result = await client.call_tool("mill", {})
|
||||
|
||||
assert unstamped(result) == snapshot(
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ async def test_adding_and_removing_tools_does_not_notify_connected_clients(conne
|
|||
async def collect(message: IncomingMessage) -> None:
|
||||
received.append(message)
|
||||
|
||||
async with connect(mcp, message_handler=collect) as client:
|
||||
async with connect(mcp, message_handler=collect, log_level="debug") as client:
|
||||
before = await client.list_tools()
|
||||
await client.call_tool("grow", {})
|
||||
after = await client.list_tools()
|
||||
|
|
|
|||
Loading…
Reference in a new issue