PyFoam.LogAnalysis.ContextLineAnalyzer module

Line analyzer that finds data n lines after a matching line

class PyFoam.LogAnalysis.ContextLineAnalyzer.ContextLineAnalyzer(trigger, nr=1)[source]

Bases: PyFoam.LogAnalysis.LogLineAnalyzer.LogLineAnalyzer

Base class for analyzers that work with a context

__init__(trigger, nr=1)[source]
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
__module__ = 'PyFoam.LogAnalysis.ContextLineAnalyzer'
callOnMatch(m)[source]

Called if the line matches

Parameters:m – The match-object
doActualAnalysis(line)[source]

Called nr lines after the match

Parameters:line – The line that should be analyzed
doAnalysis(line)[source]

Analyze a line

line - the line to be analyzed

This method carries the main functionality in the sub-classes