Skip to content

Commit

Permalink
Remove unnecessary logic
Browse files Browse the repository at this point in the history
This priority problem is fixed fundamentally, so we don't need
this logic now.

Signed-off-by: Daijiro Fukuda <[email protected]>
  • Loading branch information
daipom committed Feb 20, 2023
1 parent dd0f872 commit e58fd66
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/fluent/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1104,12 +1104,6 @@ def build_system_config(conf)
opt = {}
Fluent::SystemConfig::SYSTEM_CONFIG_PARAMETERS.each do |param|
if @cl_opt.key?(param) && !@cl_opt[param].nil?
if param == :log_level && @cl_opt[:log_level] == Fluent::Log::LEVEL_INFO
# info level can't be specified via command line option.
# log_level is info here, it is default value and <system>'s log_level should be applied if exists.
next
end

opt[param] = @cl_opt[param]
end
end
Expand Down
12 changes: 12 additions & 0 deletions test/command/test_fluentd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1220,5 +1220,17 @@ def multi_workers_ready?; true; end
"[error]",
patterns_not_match: ["[warn]"])
end

test 'system config one should not be overwritten when cmd line one is not specified' do
conf = <<CONF
<system>
log_level debug
</system>
CONF
conf_path = create_conf_file('debug.conf', conf)
assert File.exist?(conf_path)
assert_log_matches(create_cmdline(conf_path),
"[debug]")
end
end
end

0 comments on commit e58fd66

Please sign in to comment.