@@ -173,7 +173,7 @@ public actor Client {
173173 self . connection = transport
174174 try await self . connection? . connect ( )
175175
176- await logger? . info (
176+ await logger? . debug (
177177 " Client connected " , metadata: [ " name " : " \( name) " , " version " : " \( version) " ] )
178178
179179 // Start message handling loop
@@ -216,7 +216,7 @@ public actor Client {
216216 break
217217 }
218218 } while true
219- await self . logger? . info ( " Client message handling loop task is terminating. " )
219+ await self . logger? . debug ( " Client message handling loop task is terminating. " )
220220 }
221221
222222 // Automatically initialize after connecting
@@ -225,7 +225,7 @@ public actor Client {
225225
226226 /// Disconnect the client and cancel all pending requests
227227 public func disconnect( ) async {
228- await logger? . info ( " Initiating client disconnect... " )
228+ await logger? . debug ( " Initiating client disconnect... " )
229229
230230 // Part 1: Inside actor - Grab state and clear internal references
231231 let taskToCancel = self . task
@@ -242,26 +242,26 @@ public actor Client {
242242 for (_, request) in pendingRequestsToCancel {
243243 request. resume ( throwing: MCPError . internalError ( " Client disconnected " ) )
244244 }
245- await logger? . info ( " Pending requests cancelled. " )
245+ await logger? . debug ( " Pending requests cancelled. " )
246246
247247 // Cancel the task
248248 taskToCancel? . cancel ( )
249- await logger? . info ( " Message loop task cancellation requested. " )
249+ await logger? . debug ( " Message loop task cancellation requested. " )
250250
251251 // Disconnect the transport *before* awaiting the task
252252 // This should ensure the transport stream is finished, unblocking the loop.
253253 if let conn = connectionToDisconnect {
254254 await conn. disconnect ( )
255- await logger? . info ( " Transport disconnected. " )
255+ await logger? . debug ( " Transport disconnected. " )
256256 } else {
257- await logger? . info ( " No active transport connection to disconnect. " )
257+ await logger? . debug ( " No active transport connection to disconnect. " )
258258 }
259259
260260 // Await the task completion *after* transport disconnect
261261 _ = await taskToCancel? . value
262- await logger? . info ( " Client message loop task finished. " )
262+ await logger? . debug ( " Client message loop task finished. " )
263263
264- await logger? . info ( " Client disconnect complete. " )
264+ await logger? . debug ( " Client disconnect complete. " )
265265 }
266266
267267 // MARK: - Registration
@@ -468,7 +468,7 @@ public actor Client {
468468
469469 // Check if there are any requests to send
470470 guard !requests. isEmpty else {
471- await logger? . info ( " Batch requested but no requests were added. " )
471+ await logger? . debug ( " Batch requested but no requests were added. " )
472472 return // Nothing to send
473473 }
474474
0 commit comments