public BatchLoggerConfiguration UsePeriodicBatch( int batchPostingLimit = PeriodicBatchingSinkWrapper.DefaultBatchPostingLimit, TimeSpan?period = null, int queueLimit = 100) { if (_batchConfig != null) { throw new NotSupportedException("Can not use more than one Batch Configuration."); } _batchConfig = new PeriodicBatchConfig { PostingLimit = batchPostingLimit, Period = period, QueueLimit = queueLimit }; return(this); }
public BatchLoggerConfiguration UseBurstBatch( bool enableTimer = true, double interval = 5000, bool enableBatchLimit = true, int batchLimit = 100) { if (_batchConfig != null) { throw new NotSupportedException("Can not use more than one Batch Configuration."); } _batchConfig = new BurstBatchConfig { EnableTimer = enableTimer, Interval = interval, EnableBatchLimit = enableBatchLimit, BatchLimit = batchLimit }; return(this); }