[Buildbot-devel] html-access to the buildmaster
Alexander Lorenz
lorenz at testingtech.de
Wed Mar 15 19:23:53 UTC 2006
Alexander Lorenz wrote:
> Brian Warner wrote:
>>> is it possible to switch off logging of html access to the
>>> buildmaster via configuration, or do i have to edit the code?
>>>
>>
>> Alas, no. I poked around the code a bit, and couldn't find any simple
>> way to
>> turn off those log messages. Everything requires editing the code
>> somewhere.
>>
>> You can make the HTTP logs go into a separate file, instead of the usual
>> twistd.log file.. not the same as making them go away completely, but it
>> might still be useful to you. I don't think you can make this file be
>> /dev/null, however, because it's still going to want to rotate the
>> logfile
>> when it gets too big. (although maybe /dev/null never gets "too
>> big".. I'm
>> not sure.. give it a try and see what happens).
>>
>> To do this, you'd edit buildbot/status/html.py, in Waterfall.setup(),
>> and
>> change the line that says:
>>
>> self.site = server.Site(sr)
>>
>> to be:
>>
>> self.site = server.Site(sr, logPath="/path/to/logfile")
>>
>>
>> You might be able to turn off HTTP logging altogether by editing the
>> code
>> that defines Twisted's web server. For this, you'd probably change
>> twisted/web/http.py, in HTTPFactory.log(), and just put "return" as
>> the first
>> line there (bypassing the rest of the method). Note that this will
>> affect
>> *all* twisted web servers using that code.
>>
>> hope that helps,
>> -Brian
>>
>>
> i've just triked it out: it doesn't seem to work.
> there are two html.py files by the way, one in
>
> buildbot/status/
>
> and one in
>
> buildbot/build/lib/buildbot/status/
>
>
>
> it does not have any effect, no matter which one i change: html log
> still ends up in the twistd.log of the buildmaster.
> in order to find out which html.py is used, i put in a syntax error on
> purpose .... still no effekt, also no error trace ... strange ...
>
>
> regards
> lx
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
so, now i found a third version of html.py (which is probably the one that is used, as there is also some bytecode files there) in
/usr/lib/python2.4/site-packages/buildbot/status
and somehow managed to crash the twisted server with the following stacktrace in the master config:
2006/03/15 20:02 CET [HTTPChannel,0,127.0.0.1] Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/twisted/protocols/basic.py", line 221, in dataReceived
why = self.lineReceived(line)
File "/usr/lib/python2.4/site-packages/twisted/web/http.py", line 961, in lineReceived
self.allContentReceived()
File "/usr/lib/python2.4/site-packages/twisted/web/http.py", line 1002, in allContentReceived
req.requestReceived(command, path, version)
File "/usr/lib/python2.4/site-packages/twisted/web/http.py", line 557, in requestReceived
self.process()
--- <exception caught here> ---
File "/usr/lib/python2.4/site-packages/twisted/web/server.py", line 153, in process
self.render(resrc)
File "/usr/lib/python2.4/site-packages/twisted/web/server.py", line 160, in render
body = resrc.render(self)
File "/usr/lib/python2.4/site-packages/buildbot/status/html.py", line 149, in render
data = self.content(request)
File "/usr/lib/python2.4/site-packages/buildbot/status/html.py", line 173, in content
data += self.body(request)
File "/usr/lib/python2.4/site-packages/buildbot/status/html.py", line 1145, in body
sourceEvents)
File "/usr/lib/python2.4/site-packages/buildbot/status/html.py", line 1458, in phase2
b = IBox(block[i]).getBox()
File "/usr/lib/python2.4/site-packages/buildbot/status/html.py", line 955, in getBox
text.append("<a href=\"%s\">%s</a>" % (url, html.escape(name)))
exceptions.AttributeError: 'str' object has no attribute 'append'
although i reverted all the changes i made (only th eline you told me in html.py)
the master is still running, but instead of the waterfall i get an even longer, more colorful and more complicated stacktrace.
apparently it is necessary to have a good python knowledge (which i don't so far) in oeder to work properly with buildbot.
any ideas on how i get out of this mess? O_o
thx in advance,
lx
More information about the devel
mailing list