public override void ActivateOptions() { _client = new WebElasticClient(Server, Port, Ssl, AllowSelfSignedServerCert, BasicAuthUsername, BasicAuthPassword); if (Template != null && Template.IsValid) { _client.PutTemplateRaw(Template.Name, File.ReadAllText(Template.FileName)); } ElasticFilters.PrepareConfiguration(_client); RestartTimer(); }
public override void ActivateOptions() { _client = new WebElasticClient(Server, Port); if (Template != null && Template.IsValid) { _client.PutTemplateRaw(Template.Name, File.ReadAllText(Template.FileName)); } ElasticFilters.PrepareConfiguration(_client); RestartTimer(); }
public override void ActivateOptions() { AddOptionalServer(); _client = new WebElasticClient(Servers, ElasticSearchTimeout, Ssl, AllowSelfSignedServerCert, AuthenticationMethod); LogEventFactory.Configure(this); if (Template != null && Template.IsValid) { _client.PutTemplateRaw(Template.Name, File.ReadAllText(Template.FileName)); } ElasticFilters.PrepareConfiguration(_client); RestartTimer(); }
public override void ActivateOptions() { _client = new WebElasticClient(Server, Port, Ssl, AllowSelfSignedServerCert, BasicAuthUsername, BasicAuthPassword, UseAWS4Signer, AWS4SignerRegion, AWS4SignerAccessKey, AWS4SignerSecretKey, ElasticSearchTimeout); LogEventFactory.Configure(this); if (Template != null && Template.IsValid) { _client.PutTemplateRaw(Template.Name, File.ReadAllText(Template.FileName)); } ElasticFilters.PrepareConfiguration(_client); RestartTimer(); }
/// <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); } }
public override void ActivateOptions() { AddOptionalServer(); _client = _elasticClientFactory.CreateClient(Servers, ElasticSearchTimeout, Ssl, AllowSelfSignedServerCert, AuthenticationMethod); _logEventConverter = _logEventConverterFactory.Create(FixedFields, SerializeObjects); if (Template != null && Template.IsValid) { if (IndexAsync) { _client.PutTemplateRaw(Template.Name, _fileAccessor.ReadAllText(Template.FileName)); } else { _client.PutTemplateRaw(Template.Name, _fileAccessor.ReadAllText(Template.FileName)); } } ElasticFilters.PrepareConfiguration(_client); _timer.Restart(BulkIdleTimeout); }