From 532b1176f9a71f0a41508b977fd280074176096d Mon Sep 17 00:00:00 2001 From: Nick Cooper <142361983+nickcoai@users.noreply.github.com> Date: Tue, 27 May 2025 18:11:08 -0400 Subject: [PATCH] RFC: Lower log levels used for connections (#821) --- src/mcp/client/sse.py | 6 +++--- src/mcp/client/streamable_http.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mcp/client/sse.py b/src/mcp/client/sse.py index 476c5c0..2013e41 100644 --- a/src/mcp/client/sse.py +++ b/src/mcp/client/sse.py @@ -53,7 +53,7 @@ async def sse_client( async with anyio.create_task_group() as tg: try: - logger.info(f"Connecting to SSE endpoint: {remove_request_params(url)}") + logger.debug(f"Connecting to SSE endpoint: {remove_request_params(url)}") async with httpx_client_factory(headers=headers, auth=auth) as client: async with aconnect_sse( client, @@ -73,7 +73,7 @@ async def sse_client( match sse.event: case "endpoint": endpoint_url = urljoin(url, sse.data) - logger.info( + logger.debug( f"Received endpoint URL: {endpoint_url}" ) @@ -146,7 +146,7 @@ async def sse_client( await write_stream.aclose() endpoint_url = await tg.start(sse_reader) - logger.info( + logger.debug( f"Starting post writer with endpoint URL: {endpoint_url}" ) tg.start_soon(post_writer, endpoint_url) diff --git a/src/mcp/client/streamable_http.py b/src/mcp/client/streamable_http.py index 61aca42..2855f60 100644 --- a/src/mcp/client/streamable_http.py +++ b/src/mcp/client/streamable_http.py @@ -463,7 +463,7 @@ async def streamablehttp_client( async with anyio.create_task_group() as tg: try: - logger.info(f"Connecting to StreamableHTTP endpoint: {url}") + logger.debug(f"Connecting to StreamableHTTP endpoint: {url}") async with httpx_client_factory( headers=transport.request_headers,