Skip to content
Discussion options

You must be logged in to vote

We managed to work out what was wrong - our parsing regex looked like this:
. = parse_regex!(.message,r'(?s)\[(?P<timestamp>\d+-\d+-\d+T\d+:\d+:\d+).\d+\+\d+\].(?P<severity>\w+)\s+\[(?P<class>(?:.*))\]\s-\s(?P<message>(?:.*))')
Which meant that the timestamp values being grouped into the '.timestamp' grouping did not include either the milliseconds or the timezone information.
By changing the timezone grouping end bracket to just before the end square bracket:
. = parse_regex!(.message,r'(?s)\[(?P<timestamp>\d+-\d+-\d+T\d+:\d+:\d+.\d+\+\d+)\].(?P<severity>\w+)\s+\[(?P<class>(?:.*))\]\s-\s(?P<message>(?:.*))')
it now includes the timezone information, and everything now works as we want it…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jonathanderham-streamotion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant