def parse_line(self, line):
<EOL>if self.exclude:<EOL><INDENT>for pattern in self.exclude:<EOL><INDENT>if re.search(pattern, line):<EOL><INDENT>return {}<EOL><DEDENT><DEDENT><DEDENT>if self.include:<EOL><INDENT>matched = False<EOL>for pattern in self.include:<EOL><INDENT>if re.search(pattern, line):<EOL><INDENT>matched = True<EOL>break<EOL><DEDENT><DEDENT>if not matched:<EOL><INDENT>return {}<EOL><DEDENT><DEDENT>fields = self.config.get("<STR_LIT>",{})<EOL>data = {}<EOL>for k,v in fields.items():<EOL><INDENT>try:<EOL><INDENT>data[k] = self.parse_field_value(v, line)<EOL><DEDENT>except (ValueError, TypeError) as exc:<EOL><INDENT>self.log.debug(str(exc))<EOL>return {}<EOL><DEDENT><DEDENT>for k,v in fields.items():<EOL><INDENT>if "<STR_LIT>" in v:<EOL><INDENT>data[k] = eval(v["<STR_LIT>"].format(**data))<EOL><DEDENT>if "<STR_LIT:type>" in v:<EOL><INDENT>data[k] = self.validate_value(data[k], v["<STR_LIT:type>"])<EOL><DEDENT><DEDENT>return data<EOL>
Here is where we parse values out of a single line read from the log
and return a dict containg keys and values