Skip to content

Commit 53c6c20

Browse files
committed
Fix the incorrect description in the log
1 parent a159e07 commit 53c6c20

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

mcp/spring-ai-alibaba-mcp-distributed/src/main/java/com/alibaba/cloud/ai/mcp/discovery/client/transport/sse/SseWebFluxDistributedAsyncMcpClient.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ public SseWebFluxDistributedAsyncMcpClient(String serverName, String version,
9999
this.serverEndpoint = this.nacosMcpOperationService.getServerEndpoint(serverName, version);
100100
if (this.serverEndpoint == null) {
101101
throw new NacosException(NacosException.NOT_FOUND,
102-
String.format("[Nacos Mcp Sync Client] Can not find mcp server from nacos: %s, version:%s",
102+
String.format("[Nacos Mcp Async Client] Can not find mcp server from nacos: %s, version:%s",
103103
serverName, version));
104104
}
105105
if (!StringUtils.equals(serverEndpoint.getProtocol(), AiConstants.Mcp.MCP_PROTOCOL_SSE)) {
106106
throw new RuntimeException(
107-
String.format("[Nacos Mcp Sync Client] Protocol of mcp server:%s, version :%s must be sse",
107+
String.format("[Nacos Mcp Async Client] Protocol of mcp server:%s, version :%s must be sse",
108108
serverName, version));
109109
}
110110
} catch (NacosException e) {
111111
throw new RuntimeException(String.format(
112-
"[Nacos Mcp Sync Client] Failed to get endpoints for Mcp Server from nacos: %s, version:%s",
112+
"[Nacos Mcp Async Client] Failed to get endpoints for Mcp Server from nacos: %s, version:%s",
113113
serverName, version), e);
114114
}
115115

mcp/spring-ai-alibaba-mcp-distributed/src/main/java/com/alibaba/cloud/ai/mcp/discovery/client/transport/streamable/StreamWebFluxDistributedAsyncMcpClient.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ public StreamWebFluxDistributedAsyncMcpClient(String serverName, String version,
9999
this.serverEndpoint = this.nacosMcpOperationService.getServerEndpoint(serverName, version);
100100
if (this.serverEndpoint == null) {
101101
throw new NacosException(NacosException.NOT_FOUND,
102-
String.format("[Nacos Mcp Sync Client] Can not find mcp server from nacos: %s, version:%s",
102+
String.format("[Nacos Mcp Async Client] Can not find mcp server from nacos: %s, version:%s",
103103
serverName, version));
104104
}
105105
if (!StringUtils.equals(serverEndpoint.getProtocol(), AiConstants.Mcp.MCP_PROTOCOL_STREAMABLE)) {
106106
throw new RuntimeException(
107-
String.format("[Nacos Mcp Sync Client] Protocol of mcp server:%s, version :%s must be streamable",
107+
String.format("[Nacos Mcp Async Client] Protocol of mcp server:%s, version :%s must be streamable",
108108
serverName, version));
109109
}
110110
} catch (NacosException e) {
111111
throw new RuntimeException(String.format(
112-
"[Nacos Mcp Sync Client] Failed to get endpoints for Mcp Server from nacos: %s, version:%s",
112+
"[Nacos Mcp Async Client] Failed to get endpoints for Mcp Server from nacos: %s, version:%s",
113113
serverName, version), e);
114114
}
115115

@@ -135,7 +135,7 @@ public Map<String, McpAsyncClient> init() {
135135
for (McpEndpointInfo mcpEndpointInfo : serverEndpoint.getMcpEndpointInfoList()) {
136136
updateByAddEndpoint(mcpEndpointInfo, serverEndpoint.getExportPath());
137137
}
138-
logger.info("[Nacos Mcp Sync Client] McpSyncClient init, serverName: {}, version: {}, endpoint: {}", serverName,
138+
logger.info("[Nacos Mcp Async Client] McpSyncClient init, serverName: {}, version: {}, endpoint: {}", serverName,
139139
version, serverEndpoint);
140140
return keyToClientMap;
141141
}
@@ -152,7 +152,7 @@ public void subscribe() {
152152
protocol, realVersion);
153153
updateClientList(nacosMcpServerEndpoint);
154154
});
155-
logger.info("[Nacos Mcp Sync Client] Subscribe Mcp Server from nacos, serverName: {}, version: {}", serverName,
155+
logger.info("[Nacos Mcp Async Client] Subscribe Mcp Server from nacos, serverName: {}, version: {}", serverName,
156156
version);
157157
}
158158

@@ -223,7 +223,7 @@ private void updateClientList(NacosMcpServerEndpoint newServerEndpoint) {
223223
if (!StringUtils.equals(this.serverEndpoint.getExportPath(), newServerEndpoint.getExportPath())
224224
|| !StringUtils.equals(this.serverEndpoint.getVersion(), newServerEndpoint.getVersion())) {
225225
logger.info(
226-
"[Nacos Mcp Sync Client] Mcp server {} exportPath or protocol changed, need to update all endpoints: {}",
226+
"[Nacos Mcp Async Client] Mcp server {} exportPath or protocol changed, need to update all endpoints: {}",
227227
serverName, newServerEndpoint);
228228
updateAll(newServerEndpoint);
229229
}
@@ -241,14 +241,14 @@ private void updateClientList(NacosMcpServerEndpoint newServerEndpoint) {
241241
&& newEndpoint.getPort() == currentEndpoint.getPort()))
242242
.toList();
243243
if (!addEndpointInfoList.isEmpty()) {
244-
logger.info("[Nacos Mcp Sync Client] Mcp server {} endpoints changed, endpoints need to add {}",
244+
logger.info("[Nacos Mcp Async Client] Mcp server {} endpoints changed, endpoints need to add {}",
245245
serverName, addEndpointInfoList);
246246
}
247247
for (McpEndpointInfo addEndpointInfo : addEndpointInfoList) {
248248
updateByAddEndpoint(addEndpointInfo, newServerEndpoint.getExportPath());
249249
}
250250
if (!removeEndpointInfoList.isEmpty()) {
251-
logger.info("[Nacos Mcp Sync Client] Mcp server {} endpoints changed, endpoints need to remove {}",
251+
logger.info("[Nacos Mcp Async Client] Mcp server {} endpoints changed, endpoints need to remove {}",
252252
serverName, removeEndpointInfoList);
253253
}
254254
for (McpEndpointInfo removeEndpointInfo : removeEndpointInfoList) {

0 commit comments

Comments
 (0)