From: spisarski Date: Tue, 13 Dec 2016 20:24:41 +0000 (-0700) Subject: Setting level to the Functest logger's parent logger to ensure log output from X-Git-Tag: danube.1.RC1~196 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=3b4930952a84a57a8f2a3a73ae551b7805608a06;p=functest.git 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 --- 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')