Skip to content

Commit

Permalink
elastic#9478: Fix error from repeatedly trying to register the same s…
Browse files Browse the repository at this point in the history
…etting in the runner

Fixes elastic#9480
  • Loading branch information
original-brownbear committed Apr 25, 2018
1 parent 9c581a1 commit b31c0d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions logstash-core/lib/logstash/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ class LogStash::Runner < Clamp::StrictCommand
I18n.t("logstash.runner.flag.quiet"),
:new_flag => "log.level", :new_value => "error"

# We configure the registry and load any plugin that can register hooks
# with logstash, this needs to be done before any operation.
LogStash::PLUGIN_REGISTRY.setup!

attr_reader :agent, :settings, :source_loader
attr_accessor :bootstrap_checks

Expand Down Expand Up @@ -265,10 +269,6 @@ def execute
# Add local modules to the registry before everything else
LogStash::Modules::Util.register_local_modules(LogStash::Environment::LOGSTASH_HOME)

# We configure the registry and load any plugin that can register hooks
# with logstash, this need to be done before any operation.
LogStash::PLUGIN_REGISTRY.setup!

@dispatcher = LogStash::EventDispatcher.new(self)
LogStash::PLUGIN_REGISTRY.hooks.register_emitter(self.class, @dispatcher)

Expand Down

0 comments on commit b31c0d2

Please sign in to comment.