diff options
author | Marc A. Paradise <marc.paradise@gmail.com> | 2021-04-23 13:13:30 -0400 |
---|---|---|
committer | Marc A. Paradise <marc.paradise@gmail.com> | 2021-04-23 14:51:16 -0400 |
commit | f7e5ba559ab15de087e72d6bf149232b56f195df (patch) | |
tree | 9fd48bc2de93744fdf30c1c409cdb3e9f7d69fef | |
parent | b6820f343a9b1874e8e1f623493e99823bbd5723 (diff) | |
download | chef-f7e5ba559ab15de087e72d6bf149232b56f195df.tar.gz |
Add start/end of compliance phase logging
Also reduce logging level to debug for some output that isn't
generally going to be used in the normal case where everything goes
right.
This closes #11107.
Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-rw-r--r-- | lib/chef/compliance/runner.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/chef/compliance/runner.rb b/lib/chef/compliance/runner.rb index 6bc134d08e..3f754e8259 100644 --- a/lib/chef/compliance/runner.rb +++ b/lib/chef/compliance/runner.rb @@ -57,7 +57,7 @@ class Chef def run_completed(_node, _run_status) return unless enabled? - logger.info("#{self.class}##{__method__}: enabling Compliance Phase") + logger.debug("#{self.class}##{__method__}: enabling Compliance Phase") report end @@ -68,7 +68,7 @@ class Chef # because we're still not configured correctly. return unless enabled? && @validation_passed - logger.info("#{self.class}##{__method__}: enabling Compliance Phase") + logger.debug("#{self.class}##{__method__}: enabling Compliance Phase") report end @@ -94,7 +94,9 @@ class Chef end end - def report(report = generate_report) + def report(report = nil) + logger.info "Starting Chef Infra Compliance Phase" + report ||= generate_report # This is invoked at report-time instead of with the normal validations at node loaded, # because we want to ensure that it is visible in the output - and not lost in back-scroll. warn_for_deprecated_config_values! @@ -108,6 +110,7 @@ class Chef logger.info "Reporting to #{reporter_type}" @reporters[reporter_type].send_report(report) end + logger.info "Chef Infra Compliance Phase Complete" end def inspec_opts |