cnzakii commented on code in PR #4837: URL: https://github.com/apache/eventmesh/pull/4837#discussion_r1567463983
########## eventmesh-connectors/eventmesh-connector-http/src/main/java/org/apache/eventmesh/connector/http/sink/connector/HttpSinkConnector.java: ########## @@ -120,14 +120,14 @@ private void sendMessage(ConnectRecord record) { .putHeader("Content-Type", "application/json; charset=utf-8") .sendJson(record, ar -> { if (ar.succeeded()) { + log.info("[HttpSinkConnector] Successfully send message via HTTP. Record: timestamp={}, offset={}", record.getTimestamp(), + record.getPosition().getOffset()); if (ar.result().statusCode() != HttpResponseStatus.OK.code()) { - log.error("[HttpSinkConnector] Failed to send message via HTTP. Response: {}", ar.result()); - } else { - log.info("[HttpSinkConnector] Successfully send message via HTTP. "); + log.error("[HttpSinkConnector] Unexpected response received. StatusCode: {}", ar.result().statusCode()); Review Comment: In my testing, I found that HttpResponse doesn't override the `toString()` method, so it doesn't directly print the full request, so I just logged the status code instead. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@eventmesh.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@eventmesh.apache.org For additional commands, e-mail: issues-h...@eventmesh.apache.org