diff --git a/logstash-core/lib/logstash/config/config_ast.rb b/logstash-core/lib/logstash/config/config_ast.rb index 23b9f2403da..fc5702f1a0b 100644 --- a/logstash-core/lib/logstash/config/config_ast.rb +++ b/logstash-core/lib/logstash/config/config_ast.rb @@ -232,18 +232,18 @@ def compile_initializer def compile case plugin_type - when "input" - return "start_input(#{variable_name})" - when "filter" - return <<-CODE - events = #{variable_name}.multi_filter(events) - CODE - when "output" - return "targeted_outputs << #{variable_name}\n" - when "codec" - settings = attributes.recursive_select(Attribute).collect(&:compile).reject(&:empty?) - attributes_code = "LogStash::Util.hash_merge_many(#{settings.map { |c| "{ #{c} }" }.join(", ")})" - return "plugin(#{plugin_type.inspect}, #{plugin_name.inspect}, #{attributes_code})" + when "input" + return "start_input(#{variable_name})" + when "filter" + return <<-CODE + events = #{variable_name}.multi_filter(events) + CODE + when "output" + return "targeted_outputs << #{variable_name}\n" + when "codec" + settings = attributes.recursive_select(Attribute).collect(&:compile).reject(&:empty?) + attributes_code = "LogStash::Util.hash_merge_many(#{settings.map { |c| "{ #{c} }" }.join(", ")})" + return "plugin(#{plugin_type.inspect}, #{plugin_name.inspect}, #{attributes_code})" end end