[bitbake-devel] How to determine a flowId for log messages?

Francois Retief fgretief at gmail.com
Wed May 15 17:54:29 UTC 2013


Hi,

At work we use TeamCity [1] as our CI server.  I have written a small patch
(attached to email) to extend bitbake to output log messages in TeamCity's
Service Message format [2]. This allow us to better communicate warnings
and errors to the server.

I did this by overriding the BBLogFormatter class in knotty.py. The output
is formatted with timestamp, text, errorDetails and status fields so that
the TeamCity server can augment the logs with color and terminate if errors
occur.

TeamCity also has a *flowId* field that is used as a unique identifier to
distinguish between separate processes running in parallel. On the server,
all messages with the same *flowId* is grouped together. I would like to
use it with bitbake.

What bitbake logging attribute do I need to monitor to determine the *flowId
* of a message?

I tried to use the taskId attribute in the logging record, but most of the
time it is set to either zero or not there at all.

        if hasattr(record, 'taskpid') and record.taskpid != 0:
            msg += " flowId='%s'" % record.taskpid

Are there any other way to identify log messages for grouping them together?

Or any alternative methods? Am I on the right track,
or do I need to write a whole new ui for this?

Cheers,
  Francois

[1] http://www.jetbrains.com/teamcity
[2]
http://confluence.jetbrains.com/display/TCD7/Build+Script+Interaction+with+TeamCity
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20130515/8abc47f2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bitbake-ui-changes-for-teamcity.patch
Type: application/octet-stream
Size: 2678 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20130515/8abc47f2/attachment-0001.obj>


More information about the bitbake-devel mailing list