init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,113 @@
|
|||
using System.Configuration;
|
||||
using Kreta.Core.MessageBroker.Logging.Serilog.Configuration;
|
||||
using Serilog.Events;
|
||||
using Serilog.Sinks.Elasticsearch;
|
||||
|
||||
namespace Kreta.MessageBroker.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Elastic search configuration element
|
||||
/// </summary>
|
||||
public class ElasticSearchConfigurationElement : ConfigurationElement, IElasticSearchConfiguration
|
||||
{
|
||||
#region [Properties]
|
||||
|
||||
/// <summary>
|
||||
/// Use custom back-off logic
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(UseCustomBackOffLogic), IsRequired = true)]
|
||||
public bool UseCustomBackOffLogic
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)base[nameof(UseCustomBackOffLogic)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// URI - s to send log
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(NodeUris), IsRequired = true)]
|
||||
public string NodeUris
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)base[nameof(NodeUris)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elastic search index format
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(IndexFormat), IsRequired = true)]
|
||||
public string IndexFormat
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)base[nameof(IndexFormat)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Minimum log event level
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(MinimumLogEventLevel), IsRequired = false, DefaultValue = LogEventLevel.Information)]
|
||||
public LogEventLevel MinimumLogEventLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return (LogEventLevel)base[nameof(MinimumLogEventLevel)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The connection timeout when sending bulk operations to elasticsearch in seconds
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(ConnectionTimeoutInSeconds), IsRequired = false)]
|
||||
public int? ConnectionTimeoutInSeconds
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int?)base[nameof(ConnectionTimeoutInSeconds)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Seconds wait between checking event batches
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(WaitBetweenForCheckingEventBatchesInSeconds), IsRequired = false)]
|
||||
public int? WaitBetweenForCheckingEventBatchesInSeconds
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int?)base[nameof(WaitBetweenForCheckingEventBatchesInSeconds)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The maximum number of events to post in a single batch.
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(BatchPostingLimit), IsRequired = false)]
|
||||
public int? BatchPostingLimit
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int?)base[nameof(BatchPostingLimit)];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Auto register template version
|
||||
/// </summary>
|
||||
[ConfigurationProperty(nameof(AutoRegisterTemplateVersion), IsRequired = false)]
|
||||
public AutoRegisterTemplateVersion? AutoRegisterTemplateVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return (AutoRegisterTemplateVersion?)base[nameof(AutoRegisterTemplateVersion)];
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue