File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/Elastic.Markdown/Exporters Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -187,14 +187,20 @@ public async ValueTask StartAsync(Cancel ctx = default)
187187 //The max num threads per allocated node, from testing its best to limit our max concurrency
188188 //producing to this number as well
189189 var options = NewOptions ( transport ) ;
190+ var i = 0 ;
190191 options . BufferOptions = new BufferOptions
191192 {
192193 OutboundBufferMaxSize = Endpoint . BufferSize ,
193194 ExportMaxConcurrency = Endpoint . IndexNumThreads ,
194195 ExportMaxRetries = Endpoint . MaxRetries ,
195196 } ;
196197 options . SerializerContext = SourceGenerationContext . Default ;
197- options . ExportBufferCallback = ( ) => _logger . LogInformation ( "Exported buffer to Elasticsearch" ) ;
198+ options . ExportBufferCallback = ( ) =>
199+ {
200+ var count = Interlocked . Increment ( ref i ) ;
201+ _logger . LogInformation ( "Exported {Count} documents to Elasticsearch index {Format}" ,
202+ count * Endpoint . BufferSize , options . IndexFormat ) ;
203+ } ;
198204 options . ExportExceptionCallback = e => _logger . LogError ( e , "Failed to export document" ) ;
199205 options . ServerRejectionCallback = items => _logger . LogInformation ( "Server rejection: {Rejection}" , items . First ( ) . Item2 ) ;
200206 _channel = NewChannel ( options ) ;
You can’t perform that action at this time.
0 commit comments