<PackageReference Include="Serilog.Sinks.PeriodicBatching" Version="4.1.2-dev-00851" />

Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink

Buffers log events into batches for background flushing.
namespace Serilog.Sinks.PeriodicBatching { public class PeriodicBatchingSink : IDisposable, IBatchedLogEventSink, IAsyncDisposable { public const int NoQueueLimit = -1; public PeriodicBatchingSink(IBatchedLogEventSink batchedSink, PeriodicBatchingSinkOptions options); protected PeriodicBatchingSink(int batchSizeLimit, TimeSpan period); protected PeriodicBatchingSink(int batchSizeLimit, TimeSpan period, int queueLimit); public void Emit(LogEvent logEvent); protected virtual void EmitBatch(IEnumerable<LogEvent> events); protected virtual Task EmitBatchAsync(IEnumerable<LogEvent> events); public void Dispose(); protected virtual void Dispose(bool disposing); public ValueTask DisposeAsync(); protected virtual bool CanInclude(LogEvent logEvent); protected virtual void OnEmptyBatch(); protected virtual Task OnEmptyBatchAsync(); } }