summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-04-05 22:41:15 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-04-05 22:41:15 -0700
commit505f1244da92c8767eb289bb81b4328e81992d1b (patch)
treedd1d57f554dc049d2b35dce33a3300ababb358bf
parente9af51e0cbcbeab606e8154dc271aa956a0d5744 (diff)
downloadchef-505f1244da92c8767eb289bb81b4328e81992d1b.tar.gz
remove logger magic from the windows service
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/application/windows_service.rb19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb
index c30f5d1fe8..5e95c14095 100644
--- a/lib/chef/application/windows_service.rb
+++ b/lib/chef/application/windows_service.rb
@@ -1,6 +1,6 @@
#
# Author:: Christopher Maier (<maier@lambda.local>)
-# Copyright:: Copyright 2011-2016, Chef Software, Inc.
+# Copyright:: Copyright 2011-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -241,28 +241,13 @@ class Chef
def configure_logging
Chef::Log.init(MonoLogger.new(resolve_log_location))
- if want_additional_logger?
- configure_stdout_logger
- end
Chef::Log.level = resolve_log_level
end
- def configure_stdout_logger
- stdout_logger = MonoLogger.new(STDOUT)
- stdout_logger.formatter = Chef::Log.logger.formatter
- Chef::Log.loggers << stdout_logger
- end
-
- # 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] != STDOUT ) && STDOUT.tty? && (!Chef::Config[:daemonize]) && (Chef::Config[:force_logger])
- end
-
# Use of output formatters is assumed if `force_formatter` is set or if
# `force_logger` is not set and STDOUT is to a console (tty)
def using_output_formatter?
- Chef::Config[:force_formatter] || (!Chef::Config[:force_logger] && STDOUT.tty?)
+ Chef::Config[:force_formatter] || !Chef::Config[:force_logger]
end
def auto_log_level?