private void UpdateOptions(FileLoggerOptions options) { if (RollingFrequency.TryGetRollingFrequency(options.Path, out var r)) { _msgWriter = new RollingFileWriter(options.Path, options.FileSizeLimit, options.RetainedFileCountLimit); } else { _msgWriter = new FileWriter(options.Path, options.FileSizeLimit); } if (options.IsEnabledBatching) { _msgWriter = new BatchingWriter(_msgWriter, options.FlushPeriod, options.BatchSize, options.BackgroundQueueSize); } }
public FileLoggerProvider(FileLoggerOptions options) { _filter = options.Filter ?? trueFilter; UpdateOptions(options); }