summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-07-05 17:16:51 -0700
committerBryan McLellan <btm@loftninjas.org>2018-07-10 12:32:11 -0400
commit6cfb0bfc1b512aa011cb17b6ad011109e0aa36d8 (patch)
tree4199b3353c9e1bf59cfdf747f61ab9b25adcb2b5
parent62af0026419e0d066153be8eb04569ce0aefb1b8 (diff)
downloadchef-6cfb0bfc1b512aa011cb17b6ad011109e0aa36d8.tar.gz
fix logger logic with is_default? from new mixlib-config
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--Gemfile.lock2
-rw-r--r--chef-config/chef-config.gemspec2
-rw-r--r--lib/chef/application.rb6
3 files changed, 3 insertions, 7 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index ad5b791fbf..27b4afb196 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -87,7 +87,7 @@ PATH
chef-config (13.9.7)
addressable
fuzzyurl
- mixlib-config (~> 2.0)
+ mixlib-config (>= 2.2.12, < 3.0)
mixlib-shellout (~> 2.0)
tomlrb (~> 1.2)
diff --git a/chef-config/chef-config.gemspec b/chef-config/chef-config.gemspec
index 1dc1a118ff..0db9f548b4 100644
--- a/chef-config/chef-config.gemspec
+++ b/chef-config/chef-config.gemspec
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.add_dependency "mixlib-shellout", "~> 2.0"
- spec.add_dependency "mixlib-config", "~> 2.0"
+ spec.add_dependency "mixlib-config", ">= 2.2.12", "< 3.0"
spec.add_dependency "fuzzyurl"
spec.add_dependency "addressable"
spec.add_dependency "tomlrb", "~> 1.2"
diff --git a/lib/chef/application.rb b/lib/chef/application.rb
index d8f8402aa9..98bdca09a1 100644
--- a/lib/chef/application.rb
+++ b/lib/chef/application.rb
@@ -177,11 +177,7 @@ class Chef
# Based on config and whether or not STDOUT is a tty, should we setup a
# secondary logger for stdout?
def want_additional_logger?
- ( !log_location_default? ) && STDOUT.tty? && !Chef::Config[:daemonize]
- end
-
- def log_location_default?
- Chef::Config.configurables[:log_location].instance_variable_get(:@default_value).inspect == Chef::Config[:log_location].inspect
+ Chef::Config.is_default?(:log_location) && Chef::Config[:log_location].tty? && !Chef::Config[:daemonize]
end
def configure_stdout_logger