summaryrefslogtreecommitdiff
path: root/lib/chef/config.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-05-13 14:31:27 -0700
committerdanielsdeleo <dan@getchef.com>2015-05-20 15:13:56 -0700
commit0e4e6032f6f46261a2db37815345e46bf8cf1c46 (patch)
tree7439c6e65f9d007f7561577c8e940a708989cfa4 /lib/chef/config.rb
parent41287b020be211959d05b67fc69b656f4a7fca86 (diff)
downloadchef-0e4e6032f6f46261a2db37815345e46bf8cf1c46.tar.gz
Configure logger before loading config
Diffstat (limited to 'lib/chef/config.rb')
-rw-r--r--lib/chef/config.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb
index 4c72f25af3..28c415aec8 100644
--- a/lib/chef/config.rb
+++ b/lib/chef/config.rb
@@ -19,6 +19,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+require 'chef/log'
+require 'chef-config/logger'
+
+# DI our logger into ChefConfig before we load the config. Some defaults are
+# auto-detected, and this emits log messages on some systems, all of which will
+# occur at require-time. So we need to set the logger first.
+ChefConfig.logger = Chef::Log
+
require 'chef-config/config'
class Chef