Skip to content

Commit

Permalink
Hide milestone confusing message to the user
Browse files Browse the repository at this point in the history
This PR change the log level when a user load a plugin with a milestone
option to debug instead of warn.

Fixes: #4562

Fixes #4603
  • Loading branch information
ph authored and suyograo committed Feb 3, 2016
1 parent e6bb562 commit 41c7837
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logstash-core/lib/logstash/config/mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def plugin_status(status = nil)
# inside the gemspec.
def milestone(m = nil)
@logger = Cabin::Channel.get(LogStash)
@logger.warn(I18n.t('logstash.plugin.deprecated_milestone', :plugin => config_name))
@logger.debug(I18n.t('logstash.plugin.deprecated_milestone', :plugin => config_name))
end

# Define a new configuration setting
Expand Down
2 changes: 1 addition & 1 deletion logstash-core/spec/logstash/plugin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class LogStash::Filters::MyTestFilter < LogStash::Filters::Base


it 'logs a warning if the plugin use the milestone option' do
expect_any_instance_of(Cabin::Channel).to receive(:warn)
expect_any_instance_of(Cabin::Channel).to receive(:debug)
.with(/stromae plugin is using the 'milestone' method/)

class LogStash::Filters::Stromae < LogStash::Filters::Base
Expand Down

0 comments on commit 41c7837

Please sign in to comment.