From 3c85a897027152774b55469dde3a5c6e15ae66b8 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Sat, 2 Jul 2022 20:04:10 -0400 Subject: [PATCH] Island: Change log level in FileRepositoryLoggingDecorator to debug Most log statements in repositories should probably be at debug. Services and resources could potentially log at info. --- .../repository/file_repository_logging_decorator.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/monkey/monkey_island/cc/repository/file_repository_logging_decorator.py b/monkey/monkey_island/cc/repository/file_repository_logging_decorator.py index 47ba16ca1..5365faf4b 100644 --- a/monkey/monkey_island/cc/repository/file_repository_logging_decorator.py +++ b/monkey/monkey_island/cc/repository/file_repository_logging_decorator.py @@ -11,21 +11,17 @@ class FileRepositoryLoggingDecorator(IFileRepository): self._file_repository = file_repository def save_file(self, unsafe_file_name: str, file_contents: BinaryIO): - logger.info(f"Saving file {unsafe_file_name}") - + logger.debug(f"Saving file {unsafe_file_name}") return self._file_repository.save_file(unsafe_file_name, file_contents) def open_file(self, unsafe_file_name: str) -> BinaryIO: - logger.info(f"Opening file {unsafe_file_name}") - + logger.debug(f"Opening file {unsafe_file_name}") return self._file_repository.open_file(unsafe_file_name) def delete_file(self, unsafe_file_name: str): - logger.info(f"Deleting file {unsafe_file_name}") - + logger.debug(f"Deleting file {unsafe_file_name}") return self._file_repository.delete_file(unsafe_file_name) def delete_all_files(self): - logger.info("Deleting all files in the repository") - + logger.debug("Deleting all files in the repository") return self._file_repository.delete_all_files()