Use warn level instead of error level when a plugin is using the milestone method in the plugin

Fixes #2735
This commit is contained in:
Pier-Hugues Pellerin 2015-03-02 15:44:27 -05:00 committed by Jordan Sissel
parent 057238eb0f
commit de27d9f0a0
2 changed files with 3 additions and 3 deletions

View file

@ -137,7 +137,7 @@ module LogStash::Config::Mixin
# inside the gemspec.
def milestone(m = nil)
@logger = Cabin::Channel.get(LogStash)
@logger.error(I18n.t('logstash.plugin.deprecated_milestone', :plugin => config_name))
@logger.warn(I18n.t('logstash.plugin.deprecated_milestone', :plugin => config_name))
end
# Define a new configuration setting

View file

@ -93,8 +93,8 @@ describe LogStash::Plugin do
end
it 'logs an error if the plugin use the milestone option' do
expect_any_instance_of(Cabin::Channel).to receive(:error)
it 'logs a warning if the plugin use the milestone option' do
expect_any_instance_of(Cabin::Channel).to receive(:warn)
.with(/stromae plugin is using the 'milestone' method/)
class LogStash::Filters::Stromae < LogStash::Filters::Base