From feb5992e3747072b2d29d4101a7b518474b9d767 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Mon, 13 Dec 2021 14:50:29 +0000
Subject: [PATCH] L2SS-532: Dont have urllib3 spam the logs for every URL we
 fetch. Especially our docker device suffers from this.

---
 .../tangostationcontrol/common/lofar_logging.py                | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tangostationcontrol/tangostationcontrol/common/lofar_logging.py b/tangostationcontrol/tangostationcontrol/common/lofar_logging.py
index 673af8f95..f6c6457d2 100644
--- a/tangostationcontrol/tangostationcontrol/common/lofar_logging.py
+++ b/tangostationcontrol/tangostationcontrol/common/lofar_logging.py
@@ -125,6 +125,9 @@ def configure_logger(logger: logging.Logger=None, log_extra=None, debug=False):
     # don't spam errors for git, as we use it in our log handler, which would result in an infinite loop
     logging.getLogger("git").setLevel(logging.ERROR)
 
+    # don't spam debug messages when fetching URLs
+    logging.getLogger("urllib3").setLevel(logging.INFO)
+
     # for now, also log to stderr
     # Set up logging in a way that it can be understood by a human reader, be
     # easily grep'ed, be parsed with a couple of shell commands and
-- 
GitLab