l.n.Normalizer(object) : class documentation

Part of logsparser.normalizer View In Hierarchy

Log Normalizer, based on an XML definition file.
Method __init__ initializes the normalizer with an lxml ElementTree.
Method get_description Undocumented
Method get_long_description Undocumented
Method get_uncompiled_regexp returns the uncompiled regular expression associated to pattern named p.
Method normalize normalization in standalone mode.
Method validate if the definition file comes with pattern examples, this method can
Method get_source gets the raw XML source for this normalizer.
Method get_languages guesstimates the available languages from the description field and
Method __parse_patterns Undocumented
def __init__(self, xmlconf, genericTagTypes):
initializes the normalizer with an lxml ElementTree.
Parametersxmlconflxml ElementTree normalizer definition
genericTagTypespath to generic tags definition xml file
def __parse_patterns(self, node):
Undocumented
def get_description(self, language='en'):
Undocumented
def get_long_description(self, language='en'):
Undocumented
def get_uncompiled_regexp(self, p=None, increment=0):
returns the uncompiled regular expression associated to pattern named p. If p is None, all patterns are stitched together, ready for compilation. increment is the starting value to use for the generic tag names in the returned regular expression.
Returnsregexp, dictionary of tag names <-> tag codes, dictionary of tags codes <-> pattern the tag came from, new increment value
def normalize(self, log, do_not_check_prereq=False):
normalization in standalone mode.
Parametersloga dictionary or an object providing at least a get() method
do_not_check_prereqif set to True, the prerequisite tags check is skipped (debug purpose only)
Returnsa dictionary with updated tags if normalization was successful.
def validate(self):
if the definition file comes with pattern examples, this method can be invoked to test these patterns against the examples. Note that tags not included in the "expectedTags" directives will not be checked for validation.
ReturnsTrue if the normalizer is validated, raises a ValueError describing the problem otherwise.
def get_source(self):
gets the raw XML source for this normalizer.
def get_languages(self):
guesstimates the available languages from the description field and returns them as a list.
API Documentation for logsparser, generated by pydoctor at 2011-07-19 11:51:07.