[Buildbot-commits] buildbot/docs buildbot.texinfo,1.102,1.103
Brian Warner
warner at users.sourceforge.net
Tue Jul 17 19:48:42 UTC 2007
Update of /cvsroot/buildbot/buildbot/docs
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22951/docs
Modified Files:
buildbot.texinfo
Log Message:
[project @ add BuildStep.getLog]
Original author: warner at lothar.com
Date: 2007-07-17 19:48:16+00:00
Index: buildbot.texinfo
===================================================================
RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- buildbot.texinfo 4 Jul 2007 05:09:42 -0000 1.102
+++ buildbot.texinfo 17 Jul 2007 19:48:40 -0000 1.103
@@ -197,6 +197,7 @@
Writing New BuildSteps
* BuildStep LogFiles::
+* Reading Logfiles::
* Adding LogObservers::
* BuildStep URLs::
@@ -4269,11 +4270,12 @@
@menu
* BuildStep LogFiles::
+* Reading Logfiles::
* Adding LogObservers::
* BuildStep URLs::
@end menu
- at node BuildStep LogFiles, Adding LogObservers, Writing New BuildSteps, Writing New BuildSteps
+ at node BuildStep LogFiles, Reading Logfiles, Writing New BuildSteps, Writing New BuildSteps
@subsubsection BuildStep LogFiles
Each BuildStep has a collection of ``logfiles''. Each one has a short
@@ -4363,8 +4365,31 @@
calling @code{addStdout}. These secondary LogFiles can be used as the
source of a LogObserver just like the normal ``stdio'' LogFile.
+ at node Reading Logfiles, Adding LogObservers, BuildStep LogFiles, Writing New BuildSteps
+ at subsubsection Reading Logfiles
- at node Adding LogObservers, BuildStep URLs, BuildStep LogFiles, Writing New BuildSteps
+Once a LogFile has been added to a BuildStep with @code{addLog()},
+ at code{addCompleteLog()}, @code{addHTMLLog()}, or @code{logfiles=},
+your BuildStep can retrieve it by using @code{getLog()}:
+
+ at example
+class MyBuildStep(ShellCommand):
+ logfiles = @{ "nodelog": "_test/node.log" @}
+
+ def evaluateCommand(self, cmd):
+ nodelog = self.getLog("nodelog")
+ if "STARTED" in nodelog.getText():
+ return SUCCESS
+ else:
+ return FAILURE
+ at end example
+
+For a complete list of the methods you can call on a LogFile, please
+see the docstrings on the @code{IStatusLog} class in
+ at file{buildbot/interfaces.py}.
+
+
+ at node Adding LogObservers, BuildStep URLs, Reading Logfiles, Writing New BuildSteps
@subsubsection Adding LogObservers
@cindex LogObserver
More information about the Commits
mailing list