code: function createLogRequest(logger, utils, path, environment, emitter, failureCallback) {
  
    'use strict';
  
    logger.logEnter('createLogRequest ' + path);
  
    var options = environment.elasticsearchOptions('POST', path);
  
    var respConsumer = utils.responseConsumer(logger, 'after posting events', 200, failureCallback ? failureCallback : emitter, null, 201, options, path);
  
    var request = environment.request(options, respConsumer);
  
    request.once('error', function (e) {
      emitter.emit('error', 'Error while reporting events: ' + e);
    });
  
    request.setHeader('Content-Type', 'text/plain');
  
    logger.logExit('createLogRequest');
  
    return request;
  }
docs: Creates and initializes a request object for POSTing to Elasticsearch.