summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorLucian Musat <georgex.l.musat@intel.com>2014-09-24 11:28:48 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-29 12:12:09 +0100
commit65c97d4abd26f38917cd89b5f50f7299221b2123 (patch)
tree045fea446aae2f76882ee0a52158bda4f59d6cfe /meta/lib
parentbbee747466a6947319cff2ffd676abf9432c16ae (diff)
downloadopenembedded-core-65c97d4abd26f38917cd89b5f50f7299221b2123.tar.gz
openembedded-core-65c97d4abd26f38917cd89b5f50f7299221b2123.tar.bz2
openembedded-core-65c97d4abd26f38917cd89b5f50f7299221b2123.zip
oeqa/utils: Added filter to LogResults decorator to enforce custom log level.
Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/decorators.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index a9e67ed863..7f845dbb4b 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -91,6 +91,10 @@ class testcase(object):
wrapped_f.test_case = self.test_case
return wrapped_f
+class NoParsingFilter(logging.Filter):
+ def filter(self, record):
+ return record.levelno == 100
+
def LogResults(original_class):
orig_method = original_class.run
@@ -121,6 +125,8 @@ def LogResults(original_class):
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
datefmt='%H:%M:%S',
level=custom_log_level)
+ for handler in logging.root.handlers:
+ handler.addFilter(NoParsingFilter())
local_log = logging.getLogger(caller)
#check status of tests and record it