diff --git a/src/integrationtests/java/com/aws/greengrass/integrationtests/logmanager/SpaceManagementTest.java b/src/integrationtests/java/com/aws/greengrass/integrationtests/logmanager/SpaceManagementTest.java index 8487070b..610c147f 100644 --- a/src/integrationtests/java/com/aws/greengrass/integrationtests/logmanager/SpaceManagementTest.java +++ b/src/integrationtests/java/com/aws/greengrass/integrationtests/logmanager/SpaceManagementTest.java @@ -129,7 +129,7 @@ void GIVEN_user_component_config_with_space_management_WHEN_space_exceeds_THEN_e CountDownLatch cdl = new CountDownLatch(5); Consumer listener = (m) -> { - if (m.getMessage().contains("Successfully deleted file with name")) { + if (m.getMessage().contains("Successfully deleted file")) { cdl.countDown(); } }; diff --git a/src/main/java/com/aws/greengrass/logmanager/LogManagerService.java b/src/main/java/com/aws/greengrass/logmanager/LogManagerService.java index f461ba25..557164b3 100644 --- a/src/main/java/com/aws/greengrass/logmanager/LogManagerService.java +++ b/src/main/java/com/aws/greengrass/logmanager/LogManagerService.java @@ -708,10 +708,10 @@ private void deleteFiles(long minimumBytesToBeDeleted, Path directoryPath, Patte try { Files.deleteIfExists(fileToBeDeleted.toPath()); } catch (IOException e) { - logger.atWarn().log("Unable to delete file with name {}", fileToBeDeleted.getAbsolutePath(), e); + logger.atWarn().log("Unable to delete file: {}", fileToBeDeleted.getAbsolutePath(), e); break; } - logger.atDebug().log("Successfully deleted file with name {}", fileToBeDeleted.getAbsolutePath()); + logger.atInfo().log("Successfully deleted file: {}", fileToBeDeleted.getAbsolutePath()); bytesDeleted += fileSize; } }