From 65c97d4abd26f38917cd89b5f50f7299221b2123 Mon Sep 17 00:00:00 2001 From: Lucian Musat Date: Wed, 24 Sep 2014 11:28:48 +0300 Subject: oeqa/utils: Added filter to LogResults decorator to enforce custom log level. Signed-off-by: Lucian Musat Signed-off-by: Ross Burton --- meta/lib/oeqa/utils/decorators.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meta') 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 -- cgit 1.2.3-korg