Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
BBesrour committed Nov 29, 2024
1 parent 7d1a660 commit 6bbfcd2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ public void stopUnresponsiveContainer(String containerId) {
future.get(10, TimeUnit.SECONDS); // Wait for the stop command to complete with a timeout
}
catch (NotFoundException | NotModifiedException e) {
log.debug("Container with id {} is already stopped: {}", containerId, e.getMessage());
log.warn("Container with id {} is already stopped.", containerId, e);
}
catch (Exception e) {
log.warn("Failed to stop container with id {}. Attempting to kill container: {}", containerId, e.getMessage());
log.error("Failed to stop container with id {}. Attempting to kill container.", containerId, e);

// Attempt to kill the container if stop fails
try {
Expand All @@ -236,7 +236,7 @@ public void stopUnresponsiveContainer(String containerId) {
killFuture.get(5, TimeUnit.SECONDS); // Wait for the kill command to complete with a timeout
}
catch (Exception killException) {
log.warn("Failed to kill container with id {}: {}", containerId, killException.getMessage());
log.error("Failed to kill container with id {}.", containerId, killException);
}
}
finally {
Expand Down

0 comments on commit 6bbfcd2

Please sign in to comment.