summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNolan Davidson <ndavidson@chef.io>2018-06-28 11:45:06 -0400
committerBryan McLellan <btm@loftninjas.org>2018-07-10 12:29:24 -0400
commit42535b2b0327be3fb23ebf6cf581148e9591bef3 (patch)
treef16da80384182f5346c391a6fd5426b228c6331d
parent0980445ffc7bb5e00d146cb955bce5986bacfeb2 (diff)
downloadchef-42535b2b0327be3fb23ebf6cf581148e9591bef3.tar.gz
Fix dupe stdout_logger
I _think_ this resolves issue #7184 Basically reverting back to the previous logic of `want_additional_logger?`. It was mentioned in the issue comments that the comparison against `STDOUT` wasn't working, but it seems to work for me currently on Centos7. Signed-off-by: Nolan Davidson <ndavidson@chef.io>
-rw-r--r--lib/chef/application.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb
index b20766c8b5..6327ef0f90 100644
--- a/lib/chef/application.rb
+++ b/lib/chef/application.rb
@@ -177,7 +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?
- !( Chef::Config[:log_location].is_a?(IO) && Chef::Config[:log_location].tty? ) && !Chef::Config[:daemonize]
+ ( Chef::Config[:log_location] != STDOUT ) && STDOUT.tty? && !Chef::Config[:daemonize]
end
def configure_stdout_logger