diff --git a/src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java b/src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java index b6f4c63019da..cfe5a1ab01e3 100644 --- a/src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java +++ b/src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java @@ -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 { @@ -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 {