[Buildbot-devel] html-access to the buildmaster

Brian Warner warner-buildbot at lothar.com
Tue Mar 14 00:14:53 UTC 2006


> 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




More information about the devel mailing list