From 789a6691c13425257782d60fac3a4eeb72dceead Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 30 Nov 2021 11:34:45 -0500 Subject: [PATCH] Agent: Improve log messages in RansomwarePayload.cleanup() --- .../infection_monkey/ransomware/ransomware_payload.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/monkey/infection_monkey/ransomware/ransomware_payload.py b/monkey/infection_monkey/ransomware/ransomware_payload.py index afa4ffe25..86c7cd9ba 100644 --- a/monkey/infection_monkey/ransomware/ransomware_payload.py +++ b/monkey/infection_monkey/ransomware/ransomware_payload.py @@ -76,14 +76,14 @@ class RansomwarePayload: def cleanup(self): if self._readme_incomplete: logger.info( - "README.txt file dropping was interrupted. Removing corrupt file and " - "trying again." + "The process of leaving a README.txt was interrupted. Removing the corrupt file " + "and trying again." ) try: self._readme_file_path.unlink() self._leave_readme_in_target_directory() except Exception as ex: - logger.info( - f"An exception occurred: {str(ex)}. README.txt file dropping was " - "unsuccessful." + logger.error( + "An error occurred while trying to remove the corrupt or incomplete README.txt " + f"file: {ex}" )