-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Description
Context
The support of custom grok patterns was added in #15
Just add the directory with name Patterns
and a file (the file name doesn't matter) with your own patterns.
Like Patterns\grok-custom-patterns:
ZIPCODE [1-9]{1}[0-9]{2}\s{0,1}[0-9]{3}
and use:
Grok grok = new Grok("%{ZIPCODE:zipcode}:%{EMAILADDRESS:email}");
var grokResult = grok.Parse($"122001:Bob.Davis@microsoft.com");
IndexOutOfRangeException
There is an issue when that custom file has the wrong content.
How to reproduce
Add to the Patterns\grok-custom-patterns the following data:
pattern
How to fix
Add some validation on load of custom grok file content. It should be pattern name, space, then the regexp for that pattern
Metadata
Metadata
Assignees
Labels
No labels