def parse_field_value(self, field, line):
value = None<EOL>if "<STR_LIT>" in field:<EOL><INDENT>match = re.search(field["<STR_LIT>"], line)<EOL>if not match:<EOL><INDENT>raise ValueError("<STR_LIT>".format(field, line))<EOL><DEDENT>value = match.group(<NUM_LIT:1>)<EOL><DEDENT>if "<STR_LIT:type>" in field and value is not None:<EOL><INDENT>value = self.validate_value(value, field["<STR_LIT:type>"])<EOL><DEDENT>return value<EOL>
takes a field definition and a log line and
attempts to parse out the field's value