From: jose.lausuch Date: Tue, 21 Mar 2017 16:50:25 +0000 (+0100) Subject: Ignore certain modules for logging X-Git-Tag: danube.1.RC1~22 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=19c1f1272503159dfb511cb5ea9a52d77386001a;p=functest.git Ignore certain modules for logging Some modules are logged to functest.log or the console and are not relevant for us since they are already in the openstack logs. This causes a huge log which makes it unreadable. Change-Id: I3f0fb83e2080e41cd5bf815f8448f5bc25e3464a Signed-off-by: jose.lausuch (cherry picked from commit d6f4f25e6269a23120b37f58178164740f1cf0e9) --- diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py index 022211cb7..555e9c28c 100755 --- a/functest/utils/functest_logger.py +++ b/functest/utils/functest_logger.py @@ -28,13 +28,24 @@ import json from functest.utils.constants import CONST +ignore = ["paramiko", + "stevedore.extension", + "keystoneauth.session", + "keystoneauth.identity.v3.base", + "novaclient.v2.client", + "neutronclient.v2_0.client", + "glanceclient.common.http", + "cinderclient.v2.client", + "cinderclient.client"] + class Logger(object): def __init__(self, logger_name): self.setup_logging() self.logger = logging.getLogger(logger_name) - logging.getLogger("paramiko").setLevel(logging.WARNING) + for module_name in ignore: + logging.getLogger(module_name).setLevel(logging.WARNING) def getLogger(self): return self.logger