class ElasticAPM::Config

def initialize(options = {})

rubocop:disable Metrics/MethodLength
def initialize(options = {})
  @options = load_schema
  custom_logger = options.delete(:logger)
  assign(options)
  # Pick out config_file specifically as we need it now to load it,
  # but still need the other env vars to have precedence
  env = load_env
  if (env_config_file = env.delete(:config_file))
    self.config_file = env_config_file
  end
  assign(load_config_file)
  assign(env)
  yield self if block_given?
  @logger = custom_logger || build_logger
  @__view_paths = []
  @__root_path = Dir.pwd
end