From f0fb7d5001742bb65303acd948c43cf54e0f4711 Mon Sep 17 00:00:00 2001 From: Pete Fritchman Date: Sun, 20 Feb 2011 20:46:09 -0800 Subject: [PATCH] fix :boolean config types --- lib/logstash/config/mixin.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logstash/config/mixin.rb b/lib/logstash/config/mixin.rb index 75c21d5a2..d1c3e5f96 100644 --- a/lib/logstash/config/mixin.rb +++ b/lib/logstash/config/mixin.rb @@ -135,7 +135,7 @@ module LogStash::Config::Mixin if success params[key] = result if !result.nil? else - @logger.error("Failed config #{@plugin_name}/#{key}: #{result} (#{value.inspect}") + @logger.error("Failed config #{@plugin_name}/#{key}: #{result} (#{value.inspect})") end #puts "Result: #{key} / #{result.inspect} / #{success}" @@ -202,7 +202,7 @@ module LogStash::Config::Mixin return false, "Expected boolean 'true' or 'false', got #{value.inspect}" end - result = (value == "true") + result = (value.first == "true") end # case validator else return false, "Unknown validator #{validator.class}"