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

Class LogFile


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.
Method Summary
  __init__(self, parent, name, logfilename)
  __getstate__(self)
  __setstate__(self, d)
  addEntry(self, channel, text)
  addHeader(self, text)
  addStderr(self, text)
  addStdout(self, text)
  finish(self)
  getChunks(self, channels, onlyText)
  getFile(self)
  getFilename(self)
  getName(self)
  getStep(self)
  getText(self)
  getTextWithHeaders(self)
  hasContents(self)
  isFinished(self)
  merge(self)
  readlines(self, channel)
Return an iterator that produces newline-terminated lines, excluding header chunks.
  subscribe(self, receiver, catchup)
  subscribeConsumer(self, consumer)
  unsubscribe(self, receiver)
  upgrade(self, logfilename)
Save our .entries to a new-style offline log file (if necessary), and modify our in-memory representation to use it.
  waitUntilFinished(self)

Class Variable Summary
Implements __implemented__ = <implementedBy buildbot.status.builder...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
int BUFFERSIZE = 2048                                                                  
int chunkSize = 10000                                                                 
NoneType entries = None                                                                  
NoneType filename = None                                                                  
bool finished = False
int length = 0                                                                     
NoneType openfile = None                                                                  
list runEntries = []
int runLength = 0                                                                     

Method Details

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

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

readlines(self, channel=0)

Return an iterator that produces newline-terminated lines, excluding header chunks.

upgrade(self, logfilename)

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

__implemented__

Type:
Implements
Value:
<implementedBy buildbot.status.builder.LogFile>                        

__providedBy__

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

__provides__

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

BUFFERSIZE

Type:
int
Value:
2048                                                                  

chunkSize

Type:
int
Value:
10000                                                                 

entries

Type:
NoneType
Value:
None                                                                  

filename

Type:
NoneType
Value:
None                                                                  

finished

Type:
bool
Value:
False                                                                  

length

Type:
int
Value:
0                                                                     

openfile

Type:
NoneType
Value:
None                                                                  

runEntries

Type:
list
Value:
[]                                                                     

runLength

Type:
int
Value:
0                                                                     

Generated by Epydoc 2.1 on Sun Dec 10 22:04:44 2006 http://epydoc.sf.net