summaryrefslogtreecommitdiff
path: root/lib/chef/formatters
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-08-24 17:00:12 -0700
committerTim Smith <tsmith84@gmail.com>2021-08-24 17:00:12 -0700
commitda6e027903f7e419580473b378057e2e2b36e5a3 (patch)
treef5aecc2d236eea714931963fa8e439972520cb43 /lib/chef/formatters
parentab3db93121ee85f8d91ae2f687668064eb8f5a11 (diff)
downloadchef-more_logging.tar.gz
More updates to logging wordingmore_logging
Be more clean when infra phase starts and ends and what the compliance report is. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/formatters')
-rw-r--r--lib/chef/formatters/doc.rb10
-rw-r--r--lib/chef/formatters/minimal.rb6
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb
index c573bb0570..1b752a2924 100644
--- a/lib/chef/formatters/doc.rb
+++ b/lib/chef/formatters/doc.rb
@@ -44,7 +44,7 @@ class Chef
puts_line "#{ChefUtils::Dist::Infra::PRODUCT}, version #{version}"
puts_line "Patents: #{ChefUtils::Dist::Org::PATENTS}"
puts_line "OpenSSL FIPS 140 mode enabled" if Chef::Config[:fips]
- puts_line "Starting Infra Phase"
+ puts_line "Infra Phase starting"
puts_line "Targeting node: #{Chef::Config.target_mode.host}" if Chef::Config.target_mode?
end
@@ -80,18 +80,18 @@ class Chef
puts_line ""
end
if Chef::Config[:why_run]
- puts_line "#{ChefUtils::Dist::Infra::PRODUCT} finished, #{@updated_resources}/#{total_resources} resources would have been updated"
+ puts_line "Infra Phase complete, #{@updated_resources}/#{total_resources} resources would have been updated"
else
- puts_line "#{ChefUtils::Dist::Infra::PRODUCT} finished, #{@updated_resources}/#{total_resources} resources updated in #{pretty_elapsed_time}"
+ puts_line "Infra Phase complete, #{@updated_resources}/#{total_resources} resources updated in #{pretty_elapsed_time}"
end
end
def run_failed(exception)
@end_time = Time.now
if Chef::Config[:why_run]
- puts_line "#{ChefUtils::Dist::Infra::PRODUCT} failed. #{@updated_resources} resources would have been updated"
+ puts_line "Infra Phase failed. #{@updated_resources} resources would have been updated"
else
- puts_line "#{ChefUtils::Dist::Infra::PRODUCT} failed. #{@updated_resources} resources updated in #{pretty_elapsed_time}"
+ puts_line "Infra Phase failed. #{@updated_resources} resources updated in #{pretty_elapsed_time}"
end
end
diff --git a/lib/chef/formatters/minimal.rb b/lib/chef/formatters/minimal.rb
index b2d0d7f264..c4f506531e 100644
--- a/lib/chef/formatters/minimal.rb
+++ b/lib/chef/formatters/minimal.rb
@@ -31,18 +31,18 @@ class Chef
puts_line "#{ChefUtils::Dist::Infra::PRODUCT}, version #{version}"
puts_line "Patents: #{ChefUtils::Dist::Org::PATENTS}"
puts_line "OpenSSL FIPS 140 mode enabled" if Chef::Config[:fips]
- puts_line "Starting Infra Phase"
+ puts_line "Infra Phase starting"
puts_line "Targeting node: #{Chef::Config.target_mode.host}" if Chef::Config.target_mode?
end
# Called at the end of the Chef run.
def run_completed(node)
- puts "#{ChefUtils::Dist::Infra::PRODUCT} finished, #{@updated_resources.size} resources updated"
+ puts "Infra phase complete, #{@updated_resources.size} resources updated"
end
# called at the end of a failed run
def run_failed(exception)
- puts "#{ChefUtils::Dist::Infra::PRODUCT} failed. #{@updated_resources.size} resources updated"
+ puts "Infra phase failed. #{@updated_resources.size} resources updated"
end
# Called right after ohai runs.