Skip to content

Commit 0aaf8c6

Browse files
author
Suyog Rao
committed
Clean up code
Closes elastic#1657
1 parent 7b9aba2 commit 0aaf8c6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/logstash/filters/grok.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,7 @@ def match_against_groks(groks, input, event)
331331

332332
private
333333
def handle(field, value, event)
334-
return if (value.nil? || (value.is_a?(String) && value.empty?)) unless
335-
@keep_empty_captures
334+
return if (value.nil? || (value.is_a?(String) && value.empty?)) unless @keep_empty_captures
336335

337336
if @overwrite.include?(field)
338337
event[field] = value
@@ -343,7 +342,6 @@ def handle(field, value, event)
343342
elsif v.is_a?(Array)
344343
event[field] << value
345344
elsif v.is_a?(String)
346-
#puts v, value
347345
# Promote to array since we aren't overwriting.
348346
event[field] = [v, value]
349347
end

0 commit comments

Comments
 (0)