summaryrefslogtreecommitdiff
path: root/lib/chef/knife.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-05-15 10:52:17 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-05-15 10:52:17 -0700
commitd3b0f2ce30e4a8cbcbdd0c7128f4ae710a189e83 (patch)
treea4c129fb401e234bd767602ff9d097235ce7059a /lib/chef/knife.rb
parentb086721ca70750277c407fd0cc573a08f076649f (diff)
downloadchef-d3b0f2ce30e4a8cbcbdd0c7128f4ae710a189e83.tar.gz
change default log_location + log_level for knife
send logging to STDERR and drop default log_level to :warn so that we can see warnings again. logging needs to go to STDERR so that we don't break someone's 'API' where they're piping stdin to some filter. we believe the log_level was not warn in order to suppress warns off of 404s which no longer warn by default now.
Diffstat (limited to 'lib/chef/knife.rb')
-rw-r--r--lib/chef/knife.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index 4c59f831de..71215e7fbf 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -359,7 +359,7 @@ class Chef
case Chef::Config[:verbosity]
when 0, nil
- Chef::Config[:log_level] = :error
+ Chef::Config[:log_level] = :warn
when 1
Chef::Config[:log_level] = :info
else
@@ -401,6 +401,8 @@ class Chef
end
def configure_chef
+ # knife needs to send logger output to STDERR by default
+ Chef::Config[:log_location] = STDERR
config_loader = self.class.load_config(config[:config_file])
config[:config_file] = config_loader.config_location