Revert "create source_loader after logging setup"

This commit broke the plugin contract with plugins like xpack and caused many issues there. Reverted until it can be better handled.

This reverts commit 92cdbe2dbd.

Fixes #7995
This commit is contained in:
Andrew Cholakian 2017-08-14 16:36:41 -05:00
parent 02712b7d6a
commit 35a4d202c1

View file

@ -190,6 +190,12 @@ class LogStash::Runner < Clamp::StrictCommand
@settings = LogStash::SETTINGS
@bootstrap_checks = DEFAULT_BOOTSTRAP_CHECKS.dup
# Default we check local sources: `-e`, `-f` and the logstash.yml options.
@source_loader = LogStash::Config::SourceLoader.new(@settings)
@source_loader.add_source(LogStash::Config::Source::Local.new(@settings))
@source_loader.add_source(LogStash::Config::Source::Modules.new(@settings))
@source_loader.add_source(LogStash::Config::Source::MultiLocal.new(@settings))
super(*args)
end
@ -250,12 +256,6 @@ class LogStash::Runner < Clamp::StrictCommand
return 0
end
# Default we check local sources: `-e`, `-f` and the logstash.yml options.
@source_loader = LogStash::Config::SourceLoader.new(@settings)
@source_loader.add_source(LogStash::Config::Source::Local.new(@settings))
@source_loader.add_source(LogStash::Config::Source::Modules.new(@settings))
@source_loader.add_source(LogStash::Config::Source::MultiLocal.new(@settings))
# Add local modules to the registry before everything else
LogStash::Modules::Util.register_local_modules(LogStash::Environment::LOGSTASH_HOME)