Skip to content

Commit 2d30f19

Browse files
committed
Address PR feedback
1 parent b1c8629 commit 2d30f19

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ModelContextProtocol/Logging/Log.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ internal static partial class Log
9898
[LoggerMessage(Level = LogLevel.Information, Message = "Creating process for transport for {endpointName} with command {command}, arguments {arguments}, environment {environment}, working directory {workingDirectory}, shutdown timeout {shutdownTimeout}")]
9999
internal static partial void CreateProcessForTransport(this ILogger logger, string endpointName, string command, string? arguments, string environment, string workingDirectory, string shutdownTimeout);
100100

101-
[LoggerMessage(Level = LogLevel.Error, Message = "Transport for {endpointName} error: {data}")]
102-
internal static partial void TransportError(this ILogger logger, string endpointName, string data);
101+
[LoggerMessage(Level = LogLevel.Information, Message = "Transport for {endpointName} received stderr log: {data}")]
102+
internal static partial void ReadStderr(this ILogger logger, string endpointName, string data);
103103

104104
[LoggerMessage(Level = LogLevel.Information, Message = "Transport process start failed for {endpointName}")]
105105
internal static partial void TransportProcessStartFailed(this ILogger logger, string endpointName);

src/ModelContextProtocol/Protocol/Transport/StdioClientTransport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public async Task<ITransport> ConnectAsync(CancellationToken cancellationToken =
8585
process = new() { StartInfo = startInfo };
8686

8787
// Set up error logging
88-
process.ErrorDataReceived += (sender, args) => logger.TransportError(endpointName, args.Data ?? "(no data)");
88+
process.ErrorDataReceived += (sender, args) => logger.ReadStderr(endpointName, args.Data ?? "(no data)");
8989

9090
// We need both stdin and stdout to use a no-BOM UTF-8 encoding. On .NET Core,
9191
// we can use ProcessStartInfo.StandardOutputEncoding/StandardInputEncoding, but

0 commit comments

Comments
 (0)