public static HttpLogstashEcsSinkState Create(HttpLogstashEcsSinkOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException("options");
            }

            return(new HttpLogstashEcsSinkState(options));
        }
        private HttpLogstashEcsSinkState(HttpLogstashEcsSinkOptions options)
        {
            Options = options;

            Formatter = options.CustomFormatter ?? new HttpLogstashEcsJsonFormatter(
                formatProvider: options.FormatProvider,
                renderMessage: true,
                closingDelimiter: string.Empty,
                inlineFields: options.InlineFields
                );
            DurableFormatter = options.CustomDurableFormatter ?? new HttpLogstashEcsJsonFormatter(
                formatProvider: options.FormatProvider,
                renderMessage: true,
                closingDelimiter: Environment.NewLine,
                inlineFields: options.InlineFields
                );
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpLogstashEcsSink"/> class with the provided options
 /// </summary>
 /// <param name="options">
 /// Options configuring how the sink behaves, may NOT be null
 /// </param>
 public HttpLogstashEcsSink(HttpLogstashEcsSinkOptions options)
     : base(options.BatchPostingLimit, options.Period)
 {
     _state = HttpLogstashEcsSinkState.Create(options);
 }