aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2016-12-13 13:24:41 -0700
committerSteven Pisarski <s.pisarski@cablelabs.com>2017-01-13 20:56:36 +0000
commit3b4930952a84a57a8f2a3a73ae551b7805608a06 (patch)
treec668b2a63fc21bea4b5871c1948e3fdff6923f8e
parent79edc2be6cd1be4c6add2be55178369adffb065a (diff)
Setting level to the Functest logger's parent logger to ensure log output from
Python libraries being used by framework does not get sent to dev/null. JIRA: FUNCTEST-658 The parent logger is being set to logging.WARN and this is the logger instance that is being inherited by the upstream libraries. Change-Id: I35a02a8ea075012ac21e3b5d12d27c0187057b90 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
-rw-r--r--functest/utils/functest_logger.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py
index b154f563d..c0fba082a 100644
--- a/functest/utils/functest_logger.py
+++ b/functest/utils/functest_logger.py
@@ -40,8 +40,10 @@ class Logger:
ch.setFormatter(formatter)
if CI_DEBUG is not None and CI_DEBUG.lower() == "true":
ch.setLevel(logging.DEBUG)
+ self.logger.parent.level = logging.DEBUG
else:
ch.setLevel(logging.INFO)
+ self.logger.parent.level = logging.INFO
self.logger.addHandler(ch)
hdlr = logging.FileHandler('/home/opnfv/functest/results/functest.log')