* [PATCH] oeqa/utils: Added filter to LogResults decorator to enforce custom log level.
@ 2014-09-24 8:28 Lucian Musat
0 siblings, 0 replies; only message in thread
From: Lucian Musat @ 2014-09-24 8:28 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Lucian Musat <georgex.l.musat@intel.com>
---
meta/lib/oeqa/utils/decorators.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index a9e67ed..7f845db 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
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-24 8:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24 8:28 [PATCH] oeqa/utils: Added filter to LogResults decorator to enforce custom log level Lucian Musat
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.