From 9af6c3bed19a0862c1309392ed139048e66ecb36 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 3 Mar 2022 09:37:17 -0500 Subject: [PATCH] Agent: Suppress debug logging of urllib3 urllib3 debug logs are unnecessarily verbose for our purposes. Setting the log level of urllib3 to debug unclutters the logs and makes debugging simpler. --- monkey/infection_monkey/master/automated_master.py | 4 ++++ monkey/infection_monkey/monkey.py | 1 + 2 files changed, 5 insertions(+) diff --git a/monkey/infection_monkey/master/automated_master.py b/monkey/infection_monkey/master/automated_master.py index ceb66e3b9..bf2e11132 100644 --- a/monkey/infection_monkey/master/automated_master.py +++ b/monkey/infection_monkey/master/automated_master.py @@ -90,6 +90,10 @@ class AutomatedMaster(IMaster): logger.warning("Forcefully killing the simulation") def _wait_for_master_stop_condition(self): + logger.debug( + "Checking for the stop signal from the island every " + f"{CHECK_ISLAND_FOR_STOP_COMMAND_INTERVAL_SEC} seconds." + ) timer = Timer() timer.set(CHECK_ISLAND_FOR_STOP_COMMAND_INTERVAL_SEC) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 868972ad2..261ed16ff 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -53,6 +53,7 @@ from infection_monkey.utils.monkey_log_path import get_monkey_log_path from infection_monkey.utils.signal_handler import register_signal_handlers, reset_signal_handlers logger = logging.getLogger(__name__) +logging.getLogger("urllib3").setLevel(logging.INFO) class InfectionMonkey: