Skip to content

Commit

Permalink
fix: RFC3164 regex updated (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
nandinivij authored Dec 17, 2021
1 parent e31eeaf commit 35ff77f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def strip_syslog_header(self, raw_event):
stripped_header = regex_rfc5424.group(3)
return stripped_header
regex_rfc3164 = re.search(
r"([A-Z][a-z][a-z]\s{1,2}\d{1,2}\s\d{2}[:]\d{2}[:]\d{2})\s+([\w][\w\d\.@-]*)\s(.*)$",
r"([A-Z][a-z][a-z]\s{1,2}\d{1,2}\s\d{2}[:]\d{2}[:]\d{2})\s+([\w][\w\d\.@-]*)\s\w*:?(.*)$",
raw_event,
)
if regex_rfc3164:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_extract_params():
["requirement.log"],
[True],
["syslog"],
{"event": ["<34>Oct 11 22:14:15 machine1 event_1"]},
{"event": ["<34>Oct 11 22:14:15 machine1 pr1:event_1"]},
[["model_1:dataset_1", "model_2:dataset_2"]],
[{"field1": "value1", "field2": "value2"}, {"field3": "value3"}],
[
Expand Down

0 comments on commit 35ff77f

Please sign in to comment.