diff options
author | danielsdeleo <dan@opscode.com> | 2012-11-20 12:50:58 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2012-11-20 20:01:42 -0800 |
commit | cd23a30c9635640e9d79b7255496fa67a1ee398a (patch) | |
tree | bc670abb4f3bedec62faa4b407bbc162e67d6559 /lib/chef/shell.rb | |
parent | 41a1471ccda66947793e6597fa1f19d0a351e215 (diff) | |
download | chef-cd23a30c9635640e9d79b7255496fa67a1ee398a.tar.gz |
Fix chef-shell for log_level == :auto
Also add functional regression tests
Diffstat (limited to 'lib/chef/shell.rb')
-rw-r--r-- | lib/chef/shell.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb index 0390cfaac5..4c86f96616 100644 --- a/lib/chef/shell.rb +++ b/lib/chef/shell.rb @@ -76,6 +76,8 @@ module Shell def self.setup_logger Chef::Config[:log_level] ||= :warn + # If log_level is auto, change it to warn + Chef::Config[:log_level] = :warn if Chef::Config[:log_level] == :auto Chef::Log.init(STDERR) Mixlib::Authentication::Log.logger = Ohai::Log.logger = Chef::Log.logger Chef::Log.level = Chef::Config[:log_level] || :warn @@ -229,7 +231,7 @@ FOOTER :short => "-l LOG_LEVEL", :long => '--log-level LOG_LEVEL', :description => "Set the logging level", - :proc => proc { |level| Chef::Log.level = level.to_sym } + :proc => proc { |level| Chef::Config.log_level = level.to_sym; Shell.setup_logger } option :standalone, :short => "-a", |