lib/fluent/plugin/out_newrelic.rb in fluent-plugin-newrelic-1.1.4 vs lib/fluent/plugin/out_newrelic.rb in fluent-plugin-newrelic-1.1.5

- old
+ new

@@ -48,20 +48,19 @@ end def configure(conf) super if @api_key.nil? && @license_key.nil? - raise Fluent::ConfigError.new("'api_key' or `license_key` parameter is required") + raise Fluent::ConfigError.new("'api_key' or 'license_key' parameter is required") end # create initial sockets hash and socket based on config param @end_point = URI.parse(@base_uri) auth = { @api_key.nil? ? 'X-License-Key' : 'X-Insert-Key' => - @api_key.nil? ? @license_key : @api_key + @api_key.nil? ? @license_key : @api_key } - puts auth @header = { 'X-Event-Source' => 'logs', 'Content-Encoding' => 'gzip' }.merge(auth) .freeze @@ -128,10 +127,9 @@ def send_payload(payload) http = Net::HTTP.new(@end_point.host, 443) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_PEER - puts @header request = Net::HTTP::Post.new(@end_point.request_uri, @header) request.body = payload handle_response(http.request(request)) end