Skip to content

Commit

Permalink
- fix warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jordansissel committed Feb 5, 2013
1 parent ae46ffd commit cdaec2f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/logstash/filters/csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def register
#TODO(electrical): At some point this can be removed
@config.each do |field, dest|
next if (RESERVED + ["fields", "separator", "source", "columns", "target"]).member?(field)
@logger.warn("You used a deprecated setting '#{field} => #{dest}'. You should use 'source => "%{field}"' and 'target => %{dest}'")
@logger.warn("#{self.class.config_name}: You used a deprecated setting '#{field} => #{dest}'. You should use 'source => \"#{field}\"' and 'target => \"#{dest}\"'")
@csv[field] = dest
end

Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/filters/date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def register
next if (RESERVED + ["locale", "match"]).include?(field)

recommended_setting = value.map { |v| "\"#{v}\"" }.join(", ")
@logger.warn("You used a deprecated setting '#{field} => #{value}'. You should use 'match => [ \"#{field}\", #{recommended_setting} ]'")
@logger.warn("#{self.class.config_name}: You used a deprecated setting '#{field} => #{value}'. You should use 'match => [ \"#{field}\", #{recommended_setting} ]'")
# values here are an array of format strings for the given field.
setupMatcher(field, locale, missing, value) # value.each
end # @config.each
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/filters/grok.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def register
patterns.each do |pattern|
@logger.debug? and @logger.debug("regexp: #{@type}/#{field}", :pattern => pattern)
@patterns[field].compile(pattern)
@logger.warn("You used a deprecated setting '#{field} => #{pattern}'. You should use 'match => [ \"#{field}\", \"#{pattern}\" ]'")
@logger.warn("#{self.class.config_name}: You used a deprecated setting '#{field} => #{pattern}'. You should use 'match => [ \"#{field}\", \"#{pattern}\" ]'")
end
end # @config.each
end # def register
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/filters/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def register

@config.each do |field, dest|
next if (RESERVED + ["source", "target"]).member?(field)
@logger.warn("You used a deprecated setting '#{field} => #{dest}'. You should use 'source => "%{field}"' and 'target => %{dest}'")
@logger.warn("#{self.class.config_name}: You used a deprecated setting '#{field} => #{dest}'. You should use 'source => \"#{field}\"' and 'target => \"#{dest}\"'")
@json[field] = dest
end

Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/filters/xml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def register
#TODO(electrical): Will be removed when its fully deprecated
@config.each do |field, dest|
next if (RESERVED + ["xpath", "store_xml", "source", "target"]).member?(field)
@logger.warn("You used a deprecated setting '#{field} => #{dest}'. You should use 'source => "%{field}"' and 'target => %{dest}'")
@logger.warn("#{self.class.config_name}: You used a deprecated setting '#{field} => #{dest}'. You should use 'source => \"#{field}\"' and 'target => \"#{dest}\"'")
@xml[field] = dest
end

Expand Down

0 comments on commit cdaec2f

Please sign in to comment.