summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/msg.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index 59769707e0..d79768db24 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -126,7 +126,21 @@ class BBLogFilter(object):
126 return True 126 return True
127 return False 127 return False
128 128
129class BBLogFilterStdErr(BBLogFilter):
130 def filter(self, record):
131 if not BBLogFilter.filter(self, record):
132 return False
133 if record.levelno >= logging.ERROR:
134 return True
135 return False
129 136
137class BBLogFilterStdOut(BBLogFilter):
138 def filter(self, record):
139 if not BBLogFilter.filter(self, record):
140 return False
141 if record.levelno < logging.ERROR:
142 return True
143 return False
130 144
131# Message control functions 145# Message control functions
132# 146#
@@ -164,10 +178,10 @@ def constructLogOptions():
164 debug_domains["BitBake.%s" % domainarg] = logging.DEBUG - dlevel + 1 178 debug_domains["BitBake.%s" % domainarg] = logging.DEBUG - dlevel + 1
165 return level, debug_domains 179 return level, debug_domains
166 180
167def addDefaultlogFilter(handler): 181def addDefaultlogFilter(handler, cls = BBLogFilter):
168 level, debug_domains = constructLogOptions() 182 level, debug_domains = constructLogOptions()
169 183
170 BBLogFilter(handler, level, debug_domains) 184 cls(handler, level, debug_domains)
171 185
172# 186#
173# Message handling functions 187# Message handling functions