logstash-plugins / logstash-codec-multiline

Apache License 2.0
7 stars 31 forks source link

Fix debug output for grok match #56

Closed cwurm closed 7 years ago

cwurm commented 7 years ago

@grok.match returns false if no match was found, and a Grok::Match object otherwise (https://github.com/jordansissel/ruby-grok/blob/master/lib/grok.rb).

Checking the return value with !match.nil? is incorrect, as !false.nil? is true - so the debug output here will always be true regardless of whether the grok pattern matched or not.

This fixes it.

cwurm commented 7 years ago

That build failure does not seem related to this PR...

suyograo commented 7 years ago

LGTM

suyograo commented 7 years ago

@cwurm can you bump version and changelog?

cwurm commented 7 years ago

@suyograo Done. The gemspec was already at 3.0.5 while the changelog was still at 3.0.3, so I bumped everything up to 3.0.6 and rebased.

cwurm commented 7 years ago

@suyograo can I merge this?

cwurm commented 7 years ago

@suyograo ping