From d6f4f25e6269a23120b37f58178164740f1cf0e9 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Tue, 21 Mar 2017 17:50:25 +0100 Subject: 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 --- functest/utils/functest_logger.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py index 022211cb..555e9c28 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 -- cgit 1.2.3-korg