Method: RunLoop::Core.log_run_loop_options

Defined in:
lib/run_loop/core.rb

.log_run_loop_options(options, xcode) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/run_loop/core.rb', line 30

def self.log_run_loop_options(options, xcode)
  return unless RunLoop::Environment.debug?
  # Ignore :sim_control b/c it is a ruby object; printing is not useful.
  ignored_keys = [:sim_control]
  options_to_log = {}
  options.each_pair do |key, value|
    next if ignored_keys.include?(key)
    options_to_log[key] = value
  end
  # Objects that override '==' cannot be printed by awesome_print
  # https://github.com/michaeldv/awesome_print/issues/154
  # RunLoop::Version overrides '=='
  options_to_log[:xcode] = xcode.version.to_s
  options_to_log[:xcode_path] = xcode.developer_dir
  message = options_to_log.ai({:sort_keys => true})
  logger = options[:logger]
  RunLoop::Logging.log_debug(logger, "\n" + message)
end