diff --git a/lib/fluent/engine.rb b/lib/fluent/engine.rb index aa18ac7d57..b9af3e67e9 100644 --- a/lib/fluent/engine.rb +++ b/lib/fluent/engine.rb @@ -113,11 +113,6 @@ def run_configure(conf) end def configure(conf) - # plugins / configuration dumps - Gem::Specification.find_all.select{|x| x.name =~ /^fluent(d|-(plugin|mixin)-.*)$/}.each do |spec| - $log.info :worker0, "gem '#{spec.name}' version '#{spec.version}'" - end - @root_agent.configure(conf) begin diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index 36f26dffcf..38f20a5511 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -586,7 +586,7 @@ def dry_run Fluent::Engine.dry_run_mode = true change_privilege MessagePackFactory.init - init_engine + init_engine(supervisor: true) run_configure rescue Fluent::ConfigError => e $log.error "config error", file: @config_path, error: e @@ -794,7 +794,7 @@ def change_privilege ServerEngine::Privilege.change(@chuser, @chgroup) end - def init_engine + def init_engine(supervisor: false) Fluent::Engine.init(@system_config) @libs.each {|lib| @@ -807,6 +807,13 @@ def init_engine Fluent::Engine.add_plugin_dir(dir) end } + + if supervisor + # plugins / configuration dumps + Gem::Specification.find_all.select { |x| x.name =~ /^fluent(d|-(plugin|mixin)-.*)$/ }.each do |spec| + $log.info("gem '#{spec.name}' version '#{spec.version}'") + end + end end def run_configure