Package PyFoam :: Package LogAnalysis :: Module ContextLineAnalyzer :: Class ContextLineAnalyzer
[hide private]
[frames] | no frames]

Class ContextLineAnalyzer

source code

                     object --+    
                              |    
LogLineAnalyzer.LogLineAnalyzer --+
                                  |
                                 ContextLineAnalyzer
Known Subclasses:
NameFinderLineAnalyzer.NameFinderLineAnalyzer

Base class for analyzers that work with a context

Instance Methods [hide private]
  __init__(self, trigger, nr=1)
  doAnalysis(self, line)
Analyze a line
  doActualAnalysis(self, line)
Called nr lines after the match
  callOnMatch(self, m)
Called if the line matches

Inherited from LogLineAnalyzer.LogLineAnalyzer: getTime, goOn, setDirectory, setParent, timeChanged

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, trigger, nr=1)
(Constructor)

source code 
Parameters:
  • trigger - The regular expression that has to match before data is collected
  • nr - The number of lines after the match that data is collected
Overrides: LogLineAnalyzer.LogLineAnalyzer.__init__

doAnalysis(self, line)

source code 

Analyze a line

line - the line to be analyzed

This method carries the main functionality in the sub-classes
Overrides: LogLineAnalyzer.LogLineAnalyzer.doAnalysis
(inherited documentation)

doActualAnalysis(self, line)

source code 
Called nr lines after the match
Parameters:
  • line - The line that should be analyzed

callOnMatch(self, m)

source code 
Called if the line matches
Parameters:
  • m - The match-object