1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Explicitly set logger level. Fixes #79

be1ef57 removed set_logger_level_to_debug but neglected to make the
change in parse_options for the -v flag.
This commit is contained in:
jc00ke 2012-03-14 10:09:46 -07:00
parent 74d0e5ec35
commit 63fcb7d3b2
2 changed files with 9 additions and 1 deletions

View file

@ -115,7 +115,7 @@ module Sidekiq
end
o.on "-v", "--verbose", "Print more verbose output" do
set_logger_level_to_debug
Sidekiq::Util.logger.level = Logger::DEBUG
end
o.on '-e', '--environment ENV', "Application environment" do |arg|

View file

@ -50,6 +50,14 @@ class TestCli < MiniTest::Unit::TestCase
assert_equal %w(bar foo foo foo), Sidekiq.options[:queues].sort
end
it 'sets verbose' do
old = Sidekiq::Util.logger.level
@cli.parse(['sidekiq', '-v', '-r', './test/fake_env.rb'])
assert_equal Logger::DEBUG, Sidekiq::Util.logger.level
# If we leave the logger at DEBUG it'll add a lot of noise to the test output
Sidekiq::Util.logger.level = old
end
describe 'with pidfile' do
before do
@tmp_file = Tempfile.new('sidekiq-test')