Ticket #973 (closed enhancement: fixed)
Option do disable default logging and log rotating mechanism
| Reported by: | jollyroger | Owned by: | jollyroger |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.8.2 |
| Version: | master | Keywords: | packaging |
| Cc: | djmitche |
Description
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
Change History
comment:3 Changed 3 years ago by jollyroger
- Version changed from 0.8.1 to master
- Milestone changed from undecided to 0.8.2
comment:4 Changed 3 years ago by Dustin J. Mitchell
- Status changed from accepted to closed
- Resolution set to fixed
Merge branch 'bug973' of git://github.com/jollyroger/buildbot
- 'bug973' of git://github.com/jollyroger/buildbot: Fix ticket #973
Fixes #973
Changeset: b93c9da3680455387aac1ce8c6ed2b0def329908
comment:5 Changed 3 years ago by Dustin J. Mitchell
Merge branch 'bug973' of git://github.com/jollyroger/buildbot
- 'bug973' of git://github.com/jollyroger/buildbot: Added missing command option, fixed output
Refs #973
Changeset: cced0f5022729e79e0c29b2620ad5b16fa342af0
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
Sorry, the first three lines were added accidentally, they shouldn't be here.