From d3b0f2ce30e4a8cbcbdd0c7128f4ae710a189e83 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Fri, 15 May 2015 10:52:17 -0700 Subject: 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. --- lib/chef/knife.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/chef/knife.rb') 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 -- cgit v1.2.1