3 from twisted.application import service
4 from buildbot.master import BuildMaster
7 rotateLength = 10000000
9 configfile = 'master.cfg'
11 # Default umask for server
14 # if this is a relocatable tac file, get the directory containing the TAC
17 basedir = os.path.abspath(os.path.dirname(__file__))
19 # note: this line is matched against to check that this is a buildmaster
20 # directory; do not edit it.
21 application = service.Application('buildmaster')
22 from twisted.python.logfile import LogFile
23 from twisted.python.log import ILogObserver, FileLogObserver
24 logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
25 maxRotatedFiles=maxRotatedFiles)
26 application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
28 m = BuildMaster(basedir, configfile, umask)
29 m.setServiceParent(application)
30 m.log_rotation.rotateLength = rotateLength
31 m.log_rotation.maxRotatedFiles = maxRotatedFiles