Skip to content

Commit 016ccdc

Browse files
committed
Fix some missing string to json
1 parent b9fa0f9 commit 016ccdc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/TracingMessageConsumer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private String consumeMessageSending(Message message, Instant now, String date)
134134
String id = responseMessage.getId();
135135
RequestMetadata requestMetadata = receivedRequests.remove(id);
136136
if (requestMetadata == null) {
137-
LOG.log(WARNING, String.format("Unmatched response message: %s", message));
137+
LOG.log(WARNING, String.format("Unmatched response message: %s", jsonHandler.toString(message)));
138138
return null;
139139
}
140140
String method = requestMetadata.method;
@@ -152,7 +152,7 @@ private String consumeMessageSending(Message message, Instant now, String date)
152152
String format = "[Trace - %s] Sending notification '%s'\nParams: %s\n\n\n";
153153
return String.format(format, date, method, paramsJson);
154154
} else {
155-
LOG.log(WARNING, String.format("Unknown message type: %s", message));
155+
LOG.log(WARNING, String.format("Unknown message type: %s", jsonHandler.toString(message)));
156156
return null;
157157
}
158158
}
@@ -192,7 +192,7 @@ private String consumeMessageReceiving(Message message, Instant now, String date
192192
String format = "[Trace - %s] Received notification '%s'\nParams: %s\n\n\n";
193193
return String.format(format, date, method, paramsJson);
194194
} else {
195-
LOG.log(WARNING, String.format("Unknown message type: %s", message));
195+
LOG.log(WARNING, String.format("Unknown message type: %s", jsonHandler.toString(message)));
196196
return null;
197197
}
198198
}

0 commit comments

Comments
 (0)