diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2017-03-21 17:50:25 +0100 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-03-23 13:40:01 +0000 |
commit | 19c1f1272503159dfb511cb5ea9a52d77386001a (patch) | |
tree | 5f60f79f679a7f408ada19d82b62ff35cd279708 | |
parent | 391759749df039d239082f67f435367cf77d79d1 (diff) |
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 <jose.lausuch@ericsson.com>
(cherry picked from commit d6f4f25e6269a23120b37f58178164740f1cf0e9)
-rwxr-xr-x | functest/utils/functest_logger.py | 13 |
1 files changed, 12 insertions, 1 deletions
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 |