@@ -131,7 +131,7 @@ public actor HTTPClientTransport: Transport {
131
131
if let continuation = self . initialSessionIDContinuation {
132
132
continuation. resume ( )
133
133
self . initialSessionIDContinuation = nil // Consume the continuation
134
- logger. debug ( " Initial session ID signal triggered for SSE task. " )
134
+ logger. trace ( " Initial session ID signal triggered for SSE task. " )
135
135
}
136
136
}
137
137
@@ -251,7 +251,7 @@ public actor HTTPClientTransport: Transport {
251
251
logger. warning ( " SSE responses aren't fully supported on Linux " )
252
252
messageContinuation. yield ( data)
253
253
} else if contentType. contains ( " application/json " ) {
254
- logger. debug ( " Received JSON response " , metadata: [ " size " : " \( data. count) " ] )
254
+ logger. trace ( " Received JSON response " , metadata: [ " size " : " \( data. count) " ] )
255
255
messageContinuation. yield ( data)
256
256
} else {
257
257
logger. warning ( " Unexpected content type: \( contentType) " )
@@ -285,15 +285,15 @@ public actor HTTPClientTransport: Transport {
285
285
286
286
if contentType. contains ( " text/event-stream " ) {
287
287
// For SSE, processing happens via the stream
288
- logger. debug ( " Received SSE response, processing in streaming task " )
288
+ logger. trace ( " Received SSE response, processing in streaming task " )
289
289
try await self . processSSE ( stream)
290
290
} else if contentType. contains ( " application/json " ) {
291
291
// For JSON responses, collect and deliver the data
292
292
var buffer = Data ( )
293
293
for try await byte in stream {
294
294
buffer. append ( byte)
295
295
}
296
- logger. debug ( " Received JSON response " , metadata: [ " size " : " \( buffer. count) " ] )
296
+ logger. trace ( " Received JSON response " , metadata: [ " size " : " \( buffer. count) " ] )
297
297
messageContinuation. yield ( buffer)
298
298
} else {
299
299
logger. warning ( " Unexpected content type: \( contentType) " )
@@ -390,7 +390,7 @@ public actor HTTPClientTransport: Transport {
390
390
391
391
// Wait for the initial session ID signal, but only if sessionID isn't already set
392
392
if self . sessionID == nil , let signalTask = self . initialSessionIDSignalTask {
393
- logger. debug ( " SSE streaming task waiting for initial sessionID signal... " )
393
+ logger. trace ( " SSE streaming task waiting for initial sessionID signal... " )
394
394
395
395
// Race the signalTask against a timeout
396
396
let timeoutTask = Task {
@@ -429,16 +429,16 @@ public actor HTTPClientTransport: Transport {
429
429
timeoutTask. cancel ( )
430
430
431
431
if signalReceived {
432
- logger. debug ( " SSE streaming task proceeding after initial sessionID signal. " )
432
+ logger. trace ( " SSE streaming task proceeding after initial sessionID signal. " )
433
433
} else {
434
434
logger. warning (
435
435
" Timeout waiting for initial sessionID signal. SSE stream will proceed (sessionID might be nil). "
436
436
)
437
437
}
438
438
} else if self. sessionID != nil {
439
- logger. debug (
440
- " Initial sessionID already available. Proceeding with SSE streaming task immediately. "
441
- )
439
+ logger. trace (
440
+ " Initial sessionID already available. Proceeding with SSE streaming task immediately. "
441
+ )
442
442
} else {
443
443
logger. info (
444
444
" Proceeding with SSE connection attempt; sessionID is nil. This might be expected for stateless servers or if initialize hasn't provided one yet. "
@@ -525,7 +525,7 @@ public actor HTTPClientTransport: Transport {
525
525
// Check if task has been cancelled
526
526
if Task . isCancelled { break }
527
527
528
- logger. debug (
528
+ logger. trace (
529
529
" SSE event received " ,
530
530
metadata: [
531
531
" type " : " \( event. event ?? " message " ) " ,
0 commit comments