• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2from twisted.application import service
3from buildbot.master import BuildMaster
4
5basedir = r'/buildbot/webkit'
6configfile = r'master.cfg'
7rotateLength = 1000000
8maxRotatedFiles = None
9
10application = service.Application('buildmaster')
11try:
12  from twisted.python.logfile import LogFile
13  from twisted.python.log import ILogObserver, FileLogObserver
14  logfile = LogFile.fromFullPath("twistd.log", rotateLength=rotateLength,
15                                 maxRotatedFiles=maxRotatedFiles)
16  application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
17except ImportError:
18  # probably not yet twisted 8.2.0 and beyond, can't set log yet
19  pass
20BuildMaster(basedir, configfile).setServiceParent(application)
21
22