output: fix use of exclude_tags in output plugins

For people still using `exclude_tags` in their output configuration,
Logstash stops with an exception `TypeError: can't convert nil into
String`. Fix that by fixing the reference to `@exclude_tags`.

Fixes #2323
This commit is contained in:
Vincent Bernat 2015-01-07 15:56:11 +01:00 committed by Jordan Sissel
parent 87aea97f49
commit 19bfe8c14a

View file

@ -112,7 +112,7 @@ class LogStash::Outputs::Base < LogStash::Plugin
if !@exclude_tags.empty? && event["tags"]
if @exclude_tags.send(@exclude_method) {|tag| event["tags"].include?(tag)}
@logger.debug? and @logger.debug("outputs/#{self.class.name}: Dropping event because tags contains excluded tags: #{exclude_tags.inspect}", event)
@logger.debug? and @logger.debug("outputs/#{self.class.name}: Dropping event because tags contains excluded tags: #{@exclude_tags.inspect}", event)
return false
end
end