Package buildbot :: Package status :: Module builder :: Class LogFile
[frames] | no frames]

Class LogFile

source code

A LogFile keeps all of its contents on disk, in a non-pickle format to which new entries can easily be appended. The file on disk has a name like 12-log-compile-output, under the Builder's directory. The actual filename is generated (before the LogFile is created) by BuildStatus.generateLogfileName.

Old LogFile pickles (which kept their contents in .entries) must be upgraded. The BuilderStatus is responsible for doing this, when it loads the BuildStatus into memory. The Build pickle is not modified, so users who go from 0.6.5 back to 0.6.4 don't have to lose their logs.

Instance Methods
 
__init__(self, parent, name, logfilename) source code
 
getFilename(self) source code
 
hasContents(self) source code
 
getName(self) source code
 
getStep(self) source code
 
isFinished(self) source code
 
waitUntilFinished(self) source code
 
getFile(self) source code
 
getText(self) source code
 
getTextWithHeaders(self) source code
 
getChunks(self, channels=[], onlyText=False) source code
 
readlines(self, channel=0)
Return an iterator that produces newline-terminated lines, excluding header chunks.
source code
 
subscribe(self, receiver, catchup) source code
 
unsubscribe(self, receiver) source code
 
subscribeConsumer(self, consumer) source code
 
merge(self) source code
 
addEntry(self, channel, text) source code
 
addStdout(self, text) source code
 
addStderr(self, text) source code
 
addHeader(self, text) source code
 
finish(self) source code
 
compressLog(self) source code
 
__getstate__(self) source code
 
__setstate__(self, d) source code
 
upgrade(self, logfilename)
Save our .entries to a new-style offline log file (if necessary), and modify our in-memory representation to use it.
source code
 
__providedBy__(...)
Object Specification Descriptor
source code
Class Variables
  finished = False
  length = 0
  nonHeaderLength = 0
  tailLength = 0
  chunkSize = 10000
  runLength = 0
  logMaxSize = None
  logMaxTailSize = None
  maxLengthExceeded = False
  runEntries = []
  entries = None
  BUFFERSIZE = 2048
  filename = None
  openfile = None
  compressMethod = 'bz2'
  __implemented__ = <implementedBy buildbot.status.builder.LogFile>
  __provides__ = <zope.interface.declarations.ClassProvides obje...
Method Details

__init__(self, parent, name, logfilename)
(Constructor)

source code 
Parameters:
  • parent (BuildStepStatus) - the Step that this log is a part of
  • name (string) - the name of this log, typically 'output'
  • logfilename (string) - the Builder-relative pathname for the saved entries

upgrade(self, logfilename)

source code 

Save our .entries to a new-style offline log file (if necessary), and modify our in-memory representation to use it. The original pickled LogFile (inside the pickled Build) won't be modified.


Class Variable Details

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x1044310>