Method: Chef::Client#configure_formatters

Defined in:
lib/chef/client.rb

#configure_formattersObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



337
338
339
340
341
342
343
344
345
346
347
# File 'lib/chef/client.rb', line 337

def configure_formatters
  formatters_for_run.map do |formatter_name, output_path|
    if output_path.nil?
      Chef::Formatters.new(formatter_name, STDOUT_FD, STDERR_FD)
    elsif output_path.is_a?(String)
      io = File.open(output_path, "a+")
      io.sync = true
      Chef::Formatters.new(formatter_name, io, io)
    end
  end
end