- make plugin statuses milestones instead. (LOGSTASH-1137)

The previous taxonomy confused users due to overloaded meanings of
  'beta' and 'experimental'.
This commit is contained in:
Jordan Sissel 2013-06-17 09:37:41 -07:00
parent dd8f6e147a
commit 43a519a7f6
3 changed files with 35 additions and 21 deletions

View file

@ -172,13 +172,20 @@ module LogStash::Config::Mixin
return true if @@status_notice_given
docmsg = "For more information about plugin statuses, see http://logstash.net/docs/#{LOGSTASH_VERSION}/plugin-status "
plugin_type = ancestors.find { |a| a.name =~ /::Base$/ }.config_name
log_data = { :type => plugin_type, :name => @config_name, :LOGSTASH_VERSION => LOGSTASH_VERSION }
case @plugin_status
when "unsupported"; @logger.warn(I18n.t("logstash.plugin.unsupported", :type => plugin_type, :name => @config_name, :LOGSTASH_VERSION => LOGSTASH_VERSION))
when "experimental"; @logger.warn(I18n.t("logstash.plugin.experimental", :type => plugin_type, :name => @config_name, :LOGSTASH_VERSION => LOGSTASH_VERSION))
when "beta"; @logger.warn(I18n.t("logstash.plugin.beta", :type => plugin_type, :name => @config_name, :LOGSTASH_VERSION => LOGSTASH_VERSION))
when "stable"; # This is cool. Nothing worth logging.
when nil; raise "#{@config_name} must set a plugin_status. #{docmsg}"
else; raise "#{@config_name} set an invalid plugin status #{@plugin_status}. Valid values are unsupported, experimental, beta and stable. #{docmsg}"
when LogStash::Plugin::MILESTONE_0
@logger.warn(I18n.t("logstash.plugin.milestone.0", log_data)
when LogStash::PLugin::MILESTONE_1
@logger.warn(I18n.t("logstash.plugin.milestone.1", log_data)
when LogStash::PLugin::MILESTONE_2
@logger.warn(I18n.t("logstash.plugin.milestone.2", log_data)
when LogStash::PLugin::MILESTONE_3
# No message to log, this plugin is of good quality with tests, etc.
when nil
raise "#{@config_name} must set a plugin_status. #{docmsg}"
else
raise "#{@config_name} set an invalid plugin status #{@plugin_status}. Valid values are unsupported, experimental, beta and stable. #{docmsg}"
end
@@status_notice_given = true
return true

View file

@ -7,6 +7,11 @@ class LogStash::Plugin
attr_accessor :params
attr_accessor :logger
MILESTONE_0 = "milestone 0"
MILESTONE_1 = "milestone 1"
MILESTONE_2 = "milestone 2"
MILESTONE_3 = "milestone 3"
public
def hash
params.hash ^

View file

@ -34,19 +34,21 @@ en:
Could not find any plugin type named '%{type}'. Check for typos.
Valid plugin types are 'input' 'filter' and 'output'
plugin:
unsupported: >-
Using unsupported %{type} plugin '%{name}'. This plugin isn't well
supported by the commnity and likely has no maintainer.
For more information on plugin statuses, see
milestone:
0: >-
Using milestone 0 %{type} plugin '%{name}'. This plugin isn't well
supported by the commnity and likely has no maintainer. For more
information on plugin statuses, see
http://logstash.net/docs/%{LOGSTASH_VERSION}/plugin_status
experimental: >-
Using experimental %{type} plugin '%{name}'. This plugin should work,
1: >-
Using milestone 1 %{type} plugin '%{name}'. This plugin should work,
but would benefit from use by folks like you. Please let us know if you
find bugs or have suggestions on how to improve this plugin. For more
information on plugin statuses, see
http://logstash.net/docs/%{LOGSTASH_VERSION}/plugin_status
beta: >-
Using beta %{type} plugin '%{name}'.
2: >-
Using milestone 2 %{type} plugin '%{name}'. This plugin should be
stable, but if you see strange behavior, please let us know!
For more information on plugin statuses, see
http://logstash.net/docs/%{LOGSTASH_VERSION}/plugin_status
agent: