[Buildbot-commits] [Buildbot] #973: Option do disable default logging and log rotating mechanism

Buildbot buildbot-devel at lists.sourceforge.net
Fri Aug 20 14:56:59 UTC 2010


#973: Option do disable default logging and log rotating mechanism
------------------------+---------------------------------------------------
Reporter:  jollyroger   |       Owner:  jollyroger
    Type:  enhancement  |      Status:  new       
Priority:  minor        |   Milestone:  undecided 
 Version:  0.8.1        |    Keywords:  packaging 
------------------------+---------------------------------------------------
 Currently buildbot.tac files for both buildbot and buildslave are
 generated with predefined logging and log rotation mechanism. This results
 in buildbot being insensitive to `--logfile` twistd command-line option.
 However there is a need to control logging outside of buildbot instance:
 most administrators will want to control buildbot logging and running when
 installing it system-wide.

 I propose to add an option to `create-master` and `create-slave` commands
 which will not put this piece of code inside `buildbot.tac` file:

 {{{
 # note: this line is matched against to check that this is a buildslave
 # directory; do not edit it.
 application = service.Application('buildslave')
 try:
   from twisted.python.logfile import LogFile
   from twisted.python.log import ILogObserver, FileLogObserver
   logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"),
 rotateLength=rotateLength,
                                  maxRotatedFiles=maxRotatedFiles)
   application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
 except ImportError:
   # probably not yet twisted 8.2.0 and beyond, can't set log yet
   pass
 }}}

-- 
Ticket URL: <http://buildbot.net/trac/ticket/973>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list