because english is kinda expressive enough language

This commit is contained in:
Wiibaa 2012-12-11 11:23:12 +01:00
parent aa4c29a866
commit d246d28bbd
2 changed files with 4 additions and 4 deletions

View file

@ -26,14 +26,14 @@ class LogStash::Filters::CSV < LogStash::Filters::Base
# Define the column separator value. If this is not specified the default
# is a comma ','
# Optional.
config :col_sep, :validate => :string, :default => ","
config :separator, :validate => :string, :default => ","
public
def register
@csv = {}
@config.each do |field, dest|
next if (RESERVED + ["fields", "col_sep"]).member?(field)
next if (RESERVED + ["fields", "separator"]).member?(field)
@csv[field] = dest
end
@ -65,7 +65,7 @@ class LogStash::Filters::CSV < LogStash::Filters::Base
raw = event[key].first
begin
values = CSV.parse_line(raw, {:col_sep => @col_sep})
values = CSV.parse_line(raw, {:col_sep => @separator})
data = {}
values.each_index do |i|
field_name = @fields[i] || "field#{i+1}"

View file

@ -42,7 +42,7 @@ describe LogStash::Filters::CSV do
config <<-CONFIG
filter {
csv {
col_sep => ";"
separator => ";"
}
}
CONFIG