From 3b4930952a84a57a8f2a3a73ae551b7805608a06 Mon Sep 17 00:00:00 2001 From: spisarski Date: Tue, 13 Dec 2016 13:24:41 -0700 Subject: 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 --- functest/utils/functest_logger.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'functest/utils') diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py index b154f563..c0fba082 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') -- cgit 1.2.3-korg