Skip to content

Commit 532b117

Browse files
authored
RFC: Lower log levels used for connections (#821)
1 parent 7901552 commit 532b117

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/mcp/client/sse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async def sse_client(
5353

5454
async with anyio.create_task_group() as tg:
5555
try:
56-
logger.info(f"Connecting to SSE endpoint: {remove_request_params(url)}")
56+
logger.debug(f"Connecting to SSE endpoint: {remove_request_params(url)}")
5757
async with httpx_client_factory(headers=headers, auth=auth) as client:
5858
async with aconnect_sse(
5959
client,
@@ -73,7 +73,7 @@ async def sse_reader(
7373
match sse.event:
7474
case "endpoint":
7575
endpoint_url = urljoin(url, sse.data)
76-
logger.info(
76+
logger.debug(
7777
f"Received endpoint URL: {endpoint_url}"
7878
)
7979

@@ -146,7 +146,7 @@ async def post_writer(endpoint_url: str):
146146
await write_stream.aclose()
147147

148148
endpoint_url = await tg.start(sse_reader)
149-
logger.info(
149+
logger.debug(
150150
f"Starting post writer with endpoint URL: {endpoint_url}"
151151
)
152152
tg.start_soon(post_writer, endpoint_url)

src/mcp/client/streamable_http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ async def streamablehttp_client(
463463

464464
async with anyio.create_task_group() as tg:
465465
try:
466-
logger.info(f"Connecting to StreamableHTTP endpoint: {url}")
466+
logger.debug(f"Connecting to StreamableHTTP endpoint: {url}")
467467

468468
async with httpx_client_factory(
469469
headers=transport.request_headers,

0 commit comments

Comments
 (0)