Пример #1
0
 /// <summary>
 /// Initializes a new <see cref="TextFile"/> based on a <see cref="TextFileConfiguration"/>.
 /// </summary>
 /// <param name="config">The configuration.</param>
 public TextFile(TextFileConfiguration config)
 {
     _config            = config ?? throw new ArgumentNullException(nameof(config));
     _file              = new MonitorTextFileOutput(config.Path, config.MaxCountPerFile, false);
     _countFlush        = _config.AutoFlushRate;
     _countHousekeeping = _config.HousekeepingRate;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new <see cref="TextFile"/> bound to its <see cref="TextFileConfiguration"/>.
 /// </summary>
 /// <param name="config">The configuration.</param>
 public TextFile( TextFileConfiguration config )
     : base( config )
 {
     if( config == null ) throw new ArgumentNullException( "config" );
     _file = new MonitorTextFileOutput( config.Path, config.MaxCountPerFile, config.UseGzipCompression );
     _file.FileWriteThrough = config.FileWriteThrough;
     _file.FileBufferSize = config.FileBufferSize;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new <see cref="TextFile"/> bound to its <see cref="TextFileConfiguration"/>.
 /// </summary>
 /// <param name="config">The configuration.</param>
 public TextFile(TextFileConfiguration config)
     : base(config)
 {
     if (config == null)
     {
         throw new ArgumentNullException("config");
     }
     _file = new MonitorTextFileOutput(config.Path, config.MaxCountPerFile, config.UseGzipCompression);
     _file.FileWriteThrough = config.FileWriteThrough;
     _file.FileBufferSize   = config.FileBufferSize;
 }