Skip to content

Commit

Permalink
log level should be configured via params (updated params via command…
Browse files Browse the repository at this point in the history
… line params)
  • Loading branch information
tagomoris committed Jan 10, 2017
1 parent 21fb0e9 commit 1e026a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test_supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def test_load_config
write_config tmp_dir, conf_info_str

params = {}
params['workers'] = 1
params['use_v1_config'] = true
params['log_path'] = 'test/tmp/supervisor/log'
params['suppress_repeated_stacktrace'] = true
Expand Down Expand Up @@ -243,7 +244,7 @@ def test_load_config

# fifth call after changed conf file(don't reuse config)
se_config = load_config_proc.call
assert_equal Fluent::Log::LEVEL_DEBUG, se_config[:log_level]
assert_equal Fluent::Log::LEVEL_INFO, se_config[:log_level]
end

def test_load_config_for_daemonize
Expand All @@ -261,12 +262,13 @@ def test_load_config_for_daemonize
write_config tmp_dir, conf_info_str

params = {}
params['workers'] = 1
params['use_v1_config'] = true
params['log_path'] = 'test/tmp/supervisor/log'
params['suppress_repeated_stacktrace'] = true
params['log_level'] = Fluent::Log::LEVEL_INFO
params['daemonize'] = './fluentd.pid'
load_config_proc = Proc.new { Fluent::Supervisor.load_config(tmp_dir, params) }
load_config_proc = Proc.new { Fluent::Supervisor.load_config(tmp_dir, params) }

# first call
se_config = load_config_proc.call
Expand Down Expand Up @@ -308,7 +310,7 @@ def test_load_config_for_daemonize

# fifth call after changed conf file(don't reuse config)
se_config = load_config_proc.call
assert_equal Fluent::Log::LEVEL_DEBUG, se_config[:log_level]
assert_equal Fluent::Log::LEVEL_INFO, se_config[:log_level]
end

def test_logger
Expand Down

0 comments on commit 1e026a4

Please sign in to comment.