Skip to content

Commit b5fcc27

Browse files
committed
Failling test when the json contains multiples elements
Fixes #23
1 parent c77b11d commit b5fcc27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/logstash/filters/json.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def filter(event)
7272
event[@target] = parsed
7373
else
7474
unless parsed.is_a?(Hash)
75-
event.tag(JSONPARSEFAILURE_TAG)
75+
@tag_on_failure.each{|tag| event.tag(tag)}
7676
@logger.warn("Parsed JSON object/hash requires a target configuration option", :source => @source, :raw => source)
7777
return
7878
end

0 commit comments

Comments
 (0)