Skip to content

Commit 4e9411d

Browse files
committed
use more logger
1 parent 7dc57e6 commit 4e9411d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/transport/streamable_http.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,15 @@ func (c *StreamableHTTP) handleSSEResponse(ctx context.Context, reader io.ReadCl
383383

384384
var message JSONRPCResponse
385385
if err := json.Unmarshal([]byte(data), &message); err != nil {
386-
fmt.Printf("failed to unmarshal message: %v\n", err)
386+
c.logger.Errorf("failed to unmarshal message: %v", err)
387387
return
388388
}
389389

390390
// Handle notification
391391
if message.ID.IsNil() {
392392
var notification mcp.JSONRPCNotification
393393
if err := json.Unmarshal([]byte(data), &notification); err != nil {
394-
fmt.Printf("failed to unmarshal notification: %v\n", err)
394+
c.logger.Errorf("failed to unmarshal notification: %v", err)
395395
return
396396
}
397397
c.notifyMu.RLock()
@@ -446,7 +446,7 @@ func (c *StreamableHTTP) readSSE(ctx context.Context, reader io.ReadCloser, hand
446446
case <-ctx.Done():
447447
return
448448
default:
449-
fmt.Printf("SSE stream error: %v\n", err)
449+
c.logger.Errorf("SSE stream error: %v", err)
450450
return
451451
}
452452
}

0 commit comments

Comments
 (0)