/// <summary> /// Prepare the event and add it to the BulkDescriptor. /// </summary> /// <param name="logEvent"></param> private void PrepareAndAddToBulk(Dictionary <string, object> logEvent) { ElasticFilters.PrepareEvent(logEvent); var indexName = _indexName.Format(logEvent).ToLower(); var indexType = _indexType.Format(logEvent); var operation = new InnerBulkOperation { Document = logEvent, IndexName = indexName, IndexType = indexType }; lock (_bulk) { _bulk.Add(operation); } }
/// <summary> /// Prepare the event and add it to the BulkDescriptor. /// </summary> /// <param name="logEvent"></param> private void PrepareAndAddToBulk(Dictionary<string, object> logEvent) { ElasticFilters.PrepareEvent(logEvent); var indexName = _indexName.Format(logEvent).ToLower(); var indexType = _indexType.Format(logEvent); var operation = new InnerBulkOperation { Document = logEvent, IndexName = indexName, IndexType = indexType }; lock (_bulk) { _bulk.Add(operation); } }