thekrakken / java-grok

Simple API that allows you to easily parse logs and other files
http://grok.nflabs.com/
Other
358 stars 152 forks source link

Valid patterns failing with "Deep recursion pattern" #66

Closed joschi closed 7 years ago

joschi commented 7 years ago

The valid grok patterns for parsing Postfix logs available at https://github.com/whyscream/postfix-grok-patterns/blob/f0ec34dcc6250463a30ba2077d8afa89ee1a17a1/postfix.grok fail to work with this grok library if the "only named captures" option is being used.

Logstash seems to have no problems with these patterns.

Exception (for the pattern %{POSTFIX_SMTPD}):

io.thekraken.grok.api.exception.GrokException: Deep recursion pattern compilation of %{POSTFIX_SMTPD}
    at io.thekraken.grok.api.Grok.compile(Grok.java:355)