Class: LogStash::Setting::DeprecatedSetting
- Inherits:
-
LogStash::Setting
- Object
- LogStash::Setting
- LogStash::Setting::DeprecatedSetting
- Defined in:
- lib/logstash/settings.rb
Overview
Instances of ‘DeprecatedSetting` can be registered, but will fail with helpful guidance when encountering any configuration that attempts to explicitly set the value. They should be used in the Major version immediately following a deprecation to assist users who are porting forward configurations.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from LogStash::Setting
Instance Method Summary collapse
-
#initialize(name, guidance = 'please remove the setting from your configuration and try again.') ⇒ DeprecatedSetting
constructor
A new instance of DeprecatedSetting.
- #set(value) ⇒ Object
Methods inherited from LogStash::Setting
#==, #reset, #set?, #strict?, #to_hash, #validate_value, #value
Constructor Details
#initialize(name, guidance = 'please remove the setting from your configuration and try again.') ⇒ DeprecatedSetting
Returns a new instance of DeprecatedSetting.
637 638 639 640 |
# File 'lib/logstash/settings.rb', line 637 def initialize(name, guidance='please remove the setting from your configuration and try again.') super(name, Object) @guidance = guidance end |
Instance Method Details
#set(value) ⇒ Object
642 643 644 |
# File 'lib/logstash/settings.rb', line 642 def set(value) fail(ArgumentError, "The setting `#{name}` has been deprecated and removed from Logstash; #{@guidance}") end |