Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ public ActivemqClient(ReadonlyConfig config) {
log.info("connection created");

} catch (Exception e) {
e.printStackTrace();
log.error("Error while creating AMQ client", e);
throw new ActivemqConnectorException(
ActivemqConnectorErrorCode.CREATE_ACTIVEMQ_CLIENT_FAILED,
"Error while create AMQ client ");
"Error while create AMQ client ",
e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ public void onClosing(@NotNull WebSocket webSocket, int code, @NotNull String re
@Override
public void onFailure(
@NotNull WebSocket webSocket, @NotNull Throwable t, @Nullable Response response) {
log.error("WebSocket connection failed: " + t.getMessage());
t.printStackTrace();
log.error("WebSocket connection failed: " + t.getMessage(), t);
scheduleReconnect();
}

Expand All @@ -108,7 +107,8 @@ public void onMessage(@NotNull WebSocket webSocket, @NotNull String text) {
try {
buffer.put(text);
} catch (InterruptedException e) {
e.printStackTrace();
log.error("Failed to put message into buffer", e);
Thread.currentThread().interrupt();
}
}

Expand Down Expand Up @@ -139,7 +139,8 @@ private void scheduleReconnect() {
Thread.sleep(RETRY_DELAY_MS);
connect();
} catch (InterruptedException e) {
e.printStackTrace();
log.error("Reconnection attempt interrupted", e);
Thread.currentThread().interrupt();
}
})
.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public void write(SeaTunnelRow element) throws IOException {
try {
this.client.PutLogs(plr);
} catch (Throwable e) {
log.error("write logs failed", e);
e.printStackTrace();
log.error("Failed to write logs to SLS", e);
throw new IOException(e);
}
}
Expand Down