# File lib/new_relic/agent/configuration/yaml_source.rb, line 52
        def warn_missing_config_file(path)
          based_on        = 'unknown'
          source          = ::NewRelic::Agent.config.source(:config_path)
          candidate_paths = [path]

          case source
          when DefaultSource
            based_on = 'defaults'
            candidate_paths = NewRelic::Agent.config[:config_search_paths].map do |p|
              File.expand_path(p)
            end
          when EnvironmentSource
            based_on = 'environment variable'
          when ManualSource
            based_on = 'API call'
          end

          # This is not a failure, since we do support running without a
          # newrelic.yml (configured with just ENV). It is, however, uncommon,
          # so warn about it since it's very likely to be unintended.
          NewRelic::Agent.logger.warn(
            "No configuration file found. Working directory = #{Dir.pwd}",
            "Looked in these locations (based on #{based_on}): #{candidate_paths.join(", ")}"
          )
        end