diff --git a/lib/logstash/config/mixin.rb b/lib/logstash/config/mixin.rb index 49c1736f487..f10cc212228 100644 --- a/lib/logstash/config/mixin.rb +++ b/lib/logstash/config/mixin.rb @@ -172,13 +172,20 @@ def validate_plugin_status 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 diff --git a/lib/logstash/plugin.rb b/lib/logstash/plugin.rb index ef7dcf09ec7..c76a7a2e642 100644 --- a/lib/logstash/plugin.rb +++ b/lib/logstash/plugin.rb @@ -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 ^ diff --git a/locales/en.yml b/locales/en.yml index 62cefcbf02d..6876e9583a7 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -34,21 +34,23 @@ 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 - http://logstash.net/docs/%{LOGSTASH_VERSION}/plugin_status - experimental: >- - Using experimental %{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}'. - For more information on plugin statuses, see - http://logstash.net/docs/%{LOGSTASH_VERSION}/plugin_status + 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 + 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 + 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: sighup: >- SIGHUP received.