Class: LogStash::Config::Source::Modules
- Inherits:
-
Base
- Object
- Base
- LogStash::Config::Source::Modules
show all
- Includes:
- Util::Loggable
- Defined in:
- lib/logstash/config/source/modules.rb
Instance Attribute Summary
Attributes inherited from Base
#conflict_messages
Instance Method Summary
collapse
Methods inherited from Base
#both_module_configs?, #config_path, #config_path?, #config_path_setting, #config_reload_automatic, #config_reload_automatic?, #config_reload_automatic_setting, #config_string, #config_string?, #config_string_setting, #initialize, #modules, #modules?, #modules_cli, #modules_cli?, #modules_cli_setting, #modules_defined?, #modules_setting
Instance Method Details
#config_conflict? ⇒ Boolean
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/logstash/config/source/modules.rb', line 27
def config_conflict?
@conflict_messages.clear
if modules_cli? && modules?
logger.info(I18n.t("logstash.runner.cli-module-override"))
end
if automatic_reload_with_modules?
@conflict_messages << I18n.t("logstash.runner.reload-with-modules")
end
if (modules_cli? || modules?) && (config_string? || config_path?)
@conflict_messages << I18n.t("logstash.runner.config-module-exclusive")
end
@conflict_messages.any?
end
|
#match? ⇒ Boolean
22
23
24
25
|
# File 'lib/logstash/config/source/modules.rb', line 22
def match?
(modules_cli? || modules?) && !(config_string? || config_path?) && !automatic_reload_with_modules?
end
|
#pipeline_configs ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/logstash/config/source/modules.rb', line 9
def pipeline_configs
if config_conflict? raise ConfigurationError, @conflict_messages.join(", ")
end
pipelines = LogStash::Config::ModulesCommon.pipeline_configs(@settings)
pipelines.map do |hash|
PipelineConfig.new(self, hash["pipeline_id"].to_sym,
org.logstash.common.SourceWithMetadata.new("module", hash["alt_name"], 0, 0, hash["config_string"]),
hash["settings"])
end
end
|