Skip to content

Commit

Permalink
Workaround false warning: parameter 'x' in <fields> is not used.
Browse files Browse the repository at this point in the history
record_transformer uses the `has_key()` method, not the `key()` method.

Closes  #161 (hopefully :-) )
  • Loading branch information
vinzent committed Mar 31, 2021
1 parent 613fcf2 commit 998aac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/out_splunk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def configure_fields(conf)
# This loop looks dump, but it is used to suppress the unused parameter configuration warning
# Learned from `filter_record_transformer`.
conf.elements.select { |element| element.name == 'fields' }.each do |element|
element.each_pair { |k, _v| element.key?(k) }
element.each_pair { |k, _v| element.has_key?(k) }
end

return unless @fields
Expand Down

0 comments on commit 998aac9

Please sign in to comment.