Skip to content

Commit

Permalink
Supervisor print gem list
Browse files Browse the repository at this point in the history
instead of worker0

Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Oct 25, 2019
1 parent fcd467c commit bd02bea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 0 additions & 5 deletions lib/fluent/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions lib/fluent/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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|
Expand All @@ -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
Expand Down

0 comments on commit bd02bea

Please sign in to comment.