public DurableElasticsearchSink(ElasticsearchSinkOptions options)
        {
            _state = ElasticsearchSinkState.Create(options);

            if (string.IsNullOrWhiteSpace(options.BufferBaseFilename))
            {
                throw new ArgumentException("Cannot create the durable ElasticSearch sink without a buffer base file name!");
            }

            _sink = new RollingFileSink(
                options.BufferBaseFilename + FileNameSuffix,
                _state.DurableFormatter,
                options.BufferFileSizeLimitBytes,
                null);

            _shipper = new ElasticsearchLogShipper(_state);
        }
        public DurableElasticsearchSink(ElasticsearchSinkOptions options)
        {
            _state = ElasticsearchSinkState.Create(options);

            if (string.IsNullOrWhiteSpace(options.BufferBaseFilename))
            {
                throw new ArgumentException("Cannot create the durable ElasticSearch sink without a buffer base file name!");
            }

            _sink = new RollingFileSink(
                options.BufferBaseFilename + FileNameSuffix,
                _state.DurableFormatter,
                options.BufferFileSizeLimitBytes,
                null);

            _shipper = new ElasticsearchLogShipper(_state);
        }