* [PATCH] lib/bb/event: improve handling of event queue on exit
@ 2012-09-11 9:37 Paul Eggleton
2012-09-12 17:02 ` Chris Larson
2012-09-14 8:28 ` Richard Purdie
0 siblings, 2 replies; 3+ messages in thread
From: Paul Eggleton @ 2012-09-11 9:37 UTC (permalink / raw)
To: bitbake-devel
If BitBake exits before a UI handler (server) has been registered, we
print the event queue; if there are any errors or other non-debug
messages just print these and suppress the rest of the message queue.
This improves the output when sanity check failures occur with OE-Core
by avoiding printing a long stream of uninformative debug messages.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/lib/bb/event.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index fa179d8..ab62d4d 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -104,6 +104,18 @@ def print_ui_queue():
console = logging.StreamHandler(sys.stdout)
console.setFormatter(BBLogFormatter("%(levelname)s: %(message)s"))
logger.handlers = [console]
+
+ # First check to see if we have any proper messages
+ msgprint = False
+ for event in ui_queue:
+ if isinstance(event, logging.LogRecord):
+ if event.levelno > logging.DEBUG:
+ logger.handle(event)
+ msgprint = True
+ if msgprint:
+ return
+
+ # Nope, so just print all of the messages we have (including debug messages)
for event in ui_queue:
if isinstance(event, logging.LogRecord):
logger.handle(event)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] lib/bb/event: improve handling of event queue on exit
2012-09-11 9:37 [PATCH] lib/bb/event: improve handling of event queue on exit Paul Eggleton
@ 2012-09-12 17:02 ` Chris Larson
2012-09-14 8:28 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Chris Larson @ 2012-09-12 17:02 UTC (permalink / raw)
To: Paul Eggleton; +Cc: bitbake-devel
On Tue, Sep 11, 2012 at 2:37 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> If BitBake exits before a UI handler (server) has been registered, we
> print the event queue; if there are any errors or other non-debug
> messages just print these and suppress the rest of the message queue.
>
> This improves the output when sanity check failures occur with OE-Core
> by avoiding printing a long stream of uninformative debug messages.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+1
This one is biting us, obscuring the useful sanity check messages.
Acked-by: Christopher Larson <chris_larson@mentor.com>
--
Christopher Larson
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lib/bb/event: improve handling of event queue on exit
2012-09-11 9:37 [PATCH] lib/bb/event: improve handling of event queue on exit Paul Eggleton
2012-09-12 17:02 ` Chris Larson
@ 2012-09-14 8:28 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2012-09-14 8:28 UTC (permalink / raw)
To: Paul Eggleton; +Cc: bitbake-devel
On Tue, 2012-09-11 at 10:37 +0100, Paul Eggleton wrote:
> If BitBake exits before a UI handler (server) has been registered, we
> print the event queue; if there are any errors or other non-debug
> messages just print these and suppress the rest of the message queue.
>
> This improves the output when sanity check failures occur with OE-Core
> by avoiding printing a long stream of uninformative debug messages.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> bitbake/lib/bb/event.py | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-14 8:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 9:37 [PATCH] lib/bb/event: improve handling of event queue on exit Paul Eggleton
2012-09-12 17:02 ` Chris Larson
2012-09-14 8:28 ` Richard Purdie
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.