mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
parent
ecb568e740
commit
49f03efc19
2 changed files with 11 additions and 1 deletions
|
@ -133,7 +133,7 @@ module LogStash::Config::Mixin
|
|||
# inside the gemspec.
|
||||
def milestone(m=nil)
|
||||
@logger = Cabin::Channel.get(LogStash)
|
||||
@logger.error(I18n.t('logstash.plugin.deprecated'))
|
||||
@logger.error(I18n.t('logstash.plugin.deprecated_milestone', :plugin => config_name))
|
||||
end
|
||||
|
||||
# Define a new configuration setting
|
||||
|
|
|
@ -84,5 +84,15 @@ describe LogStash::Plugin do
|
|||
LogStash::Filters::Stromae.validate({})
|
||||
LogStash::Filters::Stromae.validate({})
|
||||
end
|
||||
|
||||
it 'logs an error if the plugin use the milestone option' do
|
||||
expect_any_instance_of(Cabin::Channel).to receive(:error)
|
||||
.with(/stromae plugin is using the 'milestone' method/)
|
||||
|
||||
class LogStash::Filters::Stromae < LogStash::Filters::Base
|
||||
config_name "stromae"
|
||||
milestone 2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue