Skip to content

Commit

Permalink
Merge remote-tracking branch 'PullReq65_Update_Drain.py/patch-1'
Browse files Browse the repository at this point in the history
Pull request logpai#65 "Update Drain.py" merged - logpai#65
  • Loading branch information
bennyslbs committed Aug 10, 2021
2 parents 8786f0d + 35f2fd6 commit 71cc621
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logparser/Drain/Drain.py
Expand Up @@ -336,9 +336,9 @@ def get_parameter_list(self, row):
template_regex = re.sub(r"<.{1,5}>", "<*>", row["EventTemplate"])
if "<*>" not in template_regex: return []
template_regex = re.sub(r'([^A-Za-z0-9])', r'\\\1', template_regex)
template_regex = re.sub(r'\\ +', r'\s+', template_regex)
template_regex = re.sub(r'\\ +', r'\\s+', template_regex)
template_regex = "^" + template_regex.replace("\<\*\>", "(.*?)") + "$"
parameter_list = re.findall(template_regex, row["Content"])
parameter_list = parameter_list[0] if parameter_list else ()
parameter_list = list(parameter_list) if isinstance(parameter_list, tuple) else [parameter_list]
return parameter_list
return parameter_list

0 comments on commit 71cc621

Please sign in to comment.