Suppress admin password in default logs 06/70906/3
authorajay33 <mahajanajay33@gmail.com>
Mon, 31 Aug 2020 08:40:28 +0000 (14:10 +0530)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 5 Sep 2020 08:44:14 +0000 (10:44 +0200)
Currently, OS_PASSWORD is getting printed in the console of
Functest. This password is secret and must not be printed in
default log file.

This patch suppresses the logging of OS_PASSWORD unless
users ask for debug logs.

Signed-off-by: mahajanajay33@gmail.com
Change-Id: Ib83a12eb09a8551b30b352858649932a5ca842e4

xtesting/ci/logging.debug.ini
xtesting/ci/logging.ini
xtesting/ci/run_tests.py

index 1c8d136..eae8642 100644 (file)
@@ -45,7 +45,7 @@ args=(sys.stdout,)
 
 [handler_file]
 class=FileHandler
-level=DEBUG
+level=INFO
 formatter=standard
 args=("/var/lib/xtesting/results/xtesting.log",)
 
index a63e406..b12677f 100644 (file)
@@ -51,7 +51,7 @@ args=(sys.stdout,)
 
 [handler_file]
 class=FileHandler
-level=DEBUG
+level=INFO
 formatter=standard
 args=("/var/lib/xtesting/results/xtesting.log",)
 
index 0f43210..f96bd88 100644 (file)
@@ -110,7 +110,7 @@ class Runner():
                     value = re.sub(r'^["\' ]*|[ \'"]*$', '', "".join(var[1:]))
                     os.environ[key] = value
             rcfd.seek(0, 0)
-            LOGGER.info("Sourcing env file %s\n\n%s", rc_file, rcfd.read())
+            LOGGER.debug("Sourcing env file %s\n\n%s", rc_file, rcfd.read())
 
     @staticmethod
     def get_dict_by_test(testname):