Skip to content

Commit

Permalink
Delete file log level (#64)
Browse files Browse the repository at this point in the history
* fix: log file deletion at info level

* fix: test assertion string
  • Loading branch information
tilo-chen authored Jul 29, 2021
1 parent 1240996 commit 9ef3fdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void GIVEN_user_component_config_with_space_management_WHEN_space_exceeds_THEN_e

CountDownLatch cdl = new CountDownLatch(5);
Consumer<GreengrassLogMessage> listener = (m) -> {
if (m.getMessage().contains("Successfully deleted file with name")) {
if (m.getMessage().contains("Successfully deleted file")) {
cdl.countDown();
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9ef3fdd

Please sign in to comment.