summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2018-03-23 13:05:13 +0000
committerTim Smith <tsmith@chef.io>2018-03-26 10:34:39 -0700
commit97c1dd6f1cac6d97e85d05039cad8b28596141ba (patch)
treed8a97c0f7016986a2cc264aa50ae345638ed026c /lib/chef/util
parent1b81f35e023bcdc87e410c641545e849298de5c3 (diff)
downloadchef-97c1dd6f1cac6d97e85d05039cad8b28596141ba.tar.gz
mechanical conversion of most debug log statements to trace
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/diff.rb4
-rw-r--r--lib/chef/util/dsc/configuration_generator.rb2
-rw-r--r--lib/chef/util/dsc/lcm_output_parser.rb2
-rw-r--r--lib/chef/util/dsc/local_configuration_manager.rb8
-rw-r--r--lib/chef/util/selinux.rb2
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/util/diff.rb b/lib/chef/util/diff.rb
index 61bc2bf666..b5c85df56d 100644
--- a/lib/chef/util/diff.rb
+++ b/lib/chef/util/diff.rb
@@ -64,7 +64,7 @@ class Chef
def use_tempfile_if_missing(file)
tempfile = nil
unless File.exists?(file)
- Chef::Log.debug("File #{file} does not exist to diff against, using empty tempfile")
+ Chef::Log.trace("File #{file} does not exist to diff against, using empty tempfile")
tempfile = Tempfile.new("chef-diff")
file = tempfile.path
end
@@ -139,7 +139,7 @@ class Chef
return "(new content is binary, diff output suppressed)" if is_binary?(new_file)
begin
- Chef::Log.debug("Running: diff -u #{old_file} #{new_file}")
+ Chef::Log.trace("Running: diff -u #{old_file} #{new_file}")
diff_str = udiff(old_file, new_file)
rescue Exception => e
diff --git a/lib/chef/util/dsc/configuration_generator.rb b/lib/chef/util/dsc/configuration_generator.rb
index 8b492d483a..3e9475bac2 100644
--- a/lib/chef/util/dsc/configuration_generator.rb
+++ b/lib/chef/util/dsc/configuration_generator.rb
@@ -26,7 +26,7 @@ class Chef::Util::DSC
end
def configuration_document_from_script_code(code, configuration_flags, imports, shellout_flags)
- Chef::Log.debug("DSC: DSC code:\n '#{code}'")
+ Chef::Log.trace("DSC: DSC code:\n '#{code}'")
generated_script_path = write_document_generation_script(code, "chef_dsc", imports)
begin
configuration_document_from_script_path(generated_script_path, "chef_dsc", configuration_flags, shellout_flags)
diff --git a/lib/chef/util/dsc/lcm_output_parser.rb b/lib/chef/util/dsc/lcm_output_parser.rb
index f19f637b6d..658d5c7d8f 100644
--- a/lib/chef/util/dsc/lcm_output_parser.rb
+++ b/lib/chef/util/dsc/lcm_output_parser.rb
@@ -130,7 +130,7 @@ class Chef
end
current_resource = { :name => info }
else
- Chef::Log.debug("Ignoring op_action #{op_action}: Read line #{line}")
+ Chef::Log.trace("Ignoring op_action #{op_action}: Read line #{line}")
end
when :end
# Make sure we log the last line
diff --git a/lib/chef/util/dsc/local_configuration_manager.rb b/lib/chef/util/dsc/local_configuration_manager.rb
index 07109f7f92..81aaa098c0 100644
--- a/lib/chef/util/dsc/local_configuration_manager.rb
+++ b/lib/chef/util/dsc/local_configuration_manager.rb
@@ -46,7 +46,7 @@ class Chef::Util::DSC
private
def run_configuration_cmdlet(configuration_document, apply_configuration, shellout_flags)
- Chef::Log.debug("DSC: Calling DSC Local Config Manager to #{apply_configuration ? "set" : "test"} configuration document.")
+ Chef::Log.trace("DSC: Calling DSC Local Config Manager to #{apply_configuration ? "set" : "test"} configuration document.")
start_operation_timing
status = nil
@@ -63,10 +63,10 @@ class Chef::Util::DSC
end_operation_timing
remove_configuration_document
if last_operation_execution_time_seconds
- Chef::Log.debug("DSC: DSC operation completed in #{last_operation_execution_time_seconds} seconds.")
+ Chef::Log.trace("DSC: DSC operation completed in #{last_operation_execution_time_seconds} seconds.")
end
end
- Chef::Log.debug("DSC: Completed call to DSC Local Config Manager")
+ Chef::Log.trace("DSC: Completed call to DSC Local Config Manager")
status
end
@@ -110,7 +110,7 @@ class Chef::Util::DSC
end
def configuration_update_required?(command_output)
- Chef::Log.debug("DSC: DSC returned the following '-whatif' output from test operation:\n#{command_output}")
+ Chef::Log.trace("DSC: DSC returned the following '-whatif' output from test operation:\n#{command_output}")
begin
Parser.parse(command_output, ps_version_gte_5?)
rescue Chef::Exceptions::LCMParser => e
diff --git a/lib/chef/util/selinux.rb b/lib/chef/util/selinux.rb
index 8b4c38754c..0d973b0376 100644
--- a/lib/chef/util/selinux.rb
+++ b/lib/chef/util/selinux.rb
@@ -51,7 +51,7 @@ class Chef
restorecon_flags = [ "-R" ]
restorecon_flags << "-r" if recursive
restorecon_flags << file_path
- Chef::Log.debug("Restoring selinux security content with #{restorecon_path}")
+ Chef::Log.trace("Restoring selinux security content with #{restorecon_path}")
shell_out_compact!(restorecon_path, restorecon_flags)
else
Chef::Log.warn "Can not find 'restorecon' on the system. Skipping selinux security context restore."