Module: PactBroker::Config::RuntimeConfigurationLoggingMethods::InstanceMethods

Defined in:
lib/pact_broker/config/runtime_configuration_logging_methods.rb

Instance Method Summary collapse

Instance Method Details

#log_configuration(logger) ⇒ Object

base_url raises a not implemented error



26
27
28
29
30
31
32
33
34
35
# File 'lib/pact_broker/config/runtime_configuration_logging_methods.rb', line 26

def log_configuration(logger)
  source_info = to_source_trace
  attributes_to_log.collect(&:to_s).each_with_object({}) do | key, new_hash |
    new_hash[key] = {
      value: self.send(key.to_sym),
      source: source_info.dig(key, :source) || source_info.dig(key) || { type: :defaults }
    }
  end.sort_by { |key, _| key }.each { |key, value| log_config_inner(key, value, logger) }
  print_warnings(logger)
end