From 8ed5b7eed913a50d3543acbe0583520bfd6f7f7f Mon Sep 17 00:00:00 2001
From: Owen Jones <owen.jones@uwe.ac.uk>
Date: Wed, 13 Nov 2024 16:13:56 +0000
Subject: [PATCH] set base logging level to DEBUG so individual handlers can
 log to that level if they choose

---
 connect/csctcloud-connect.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/connect/csctcloud-connect.py b/connect/csctcloud-connect.py
index 2402398..861af4f 100644
--- a/connect/csctcloud-connect.py
+++ b/connect/csctcloud-connect.py
@@ -287,9 +287,10 @@ if __name__ == "__main__":
     )
     args = parser.parse_args()
 
-    # logging level to terminal is INFO, but file handler will only log
-    # ERROR & higher messages unless otherwise specified in program arguments
-    logger.setLevel(logging.INFO)
+    # setting the maximum possible logging level to DEBUG - terminal handler is set
+    # to log INFO and above, file handler will only log ERROR and above unless
+    # otherwise specified in program arguments
+    logger.setLevel(logging.DEBUG)
 
     file = logging.FileHandler(
         filename=pathlib.Path().home() / "csctcloud-quick-connect.log",
@@ -300,6 +301,7 @@ if __name__ == "__main__":
     logger.addHandler(file)
 
     stream = logging.StreamHandler(sys.stdout)
+    stream.setLevel(logging.INFO)
     stream.setFormatter(TerminalFormatter())
     logger.addHandler(stream)
 
-- 
GitLab