diff options
-rw-r--r-- | lib/chef/compliance/reporter/json_file.rb | 3 | ||||
-rw-r--r-- | lib/chef/compliance/runner.rb | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/compliance/reporter/json_file.rb b/lib/chef/compliance/reporter/json_file.rb index ecd2e77b55..69091e3c7b 100644 --- a/lib/chef/compliance/reporter/json_file.rb +++ b/lib/chef/compliance/reporter/json_file.rb @@ -1,4 +1,5 @@ require_relative "../../json_compat" +require_relative "../../log" class Chef module Compliance @@ -9,8 +10,8 @@ class Chef end def send_report(report) + Chef::Log.info "Writing compliance report to #{@path}" FileUtils.mkdir_p(File.dirname(@path), mode: 0700) - File.write(@path, Chef::JSONCompat.to_json(report)) end diff --git a/lib/chef/compliance/runner.rb b/lib/chef/compliance/runner.rb index 68b40ce35b..6bc134d08e 100644 --- a/lib/chef/compliance/runner.rb +++ b/lib/chef/compliance/runner.rb @@ -249,7 +249,6 @@ class Chef when "json-file" require_relative "reporter/json_file" path = node.dig("audit", "json_file", "location") - logger.info "Writing compliance report to #{path}" Chef::Compliance::Reporter::JsonFile.new(file: path) when "audit-enforcer" require_relative "reporter/compliance_enforcer" |