예제 #1
0
        public HttpLog(string logDir, LogFileNameComposer logFileNameComposer, IFileSystem fileSystem)
        {
            _fileWriterLogItemHandler = new FileWriterLogItemHandler <HttpLogItem>(logDir, logFileNameComposer, fileSystem, HttpLogItem.Header);

            _trigger = new PauseTrigger(() => TimeSpan.FromSeconds(1));

            _queuedLogItemHandler = new QueuedLogItemHandler <HttpLogItem>(_fileWriterLogItemHandler, _trigger);
        }
예제 #2
0
        public DynamicLog(string logDir, LogFileNameComposer logFileNameComposer, IFileSystem fileSystem, T headersList)
        {
            _fileWriterLogItemHandler = new FileWriterLogItemHandler <T>(logDir, logFileNameComposer, fileSystem, headersList);

            _trigger = new PauseTrigger(() => TimeSpan.FromSeconds(1));

            _queuedLogItemHandler = new QueuedLogItemHandler <T>(_fileWriterLogItemHandler, _trigger);
        }
예제 #3
0
        public Telemetry(string logDir, LogFileNameComposer logFileNameComposer, Func <bool> isActive, IFileSystem fileSystem)
        {
            _isActive = isActive;
            _fileWriterLogItemHandler = new FileWriterLogItemHandler <TelemetryLogItem>(logDir, logFileNameComposer, fileSystem, TelemetryLogItem.Header);

            _trigger = new PauseTrigger(() => TimeSpan.FromSeconds(1));

            _queuedLogItemHandler = new QueuedLogItemHandler <TelemetryLogItem>(_fileWriterLogItemHandler, _trigger);
        }
예제 #4
0
 public FileWriterLogItemHandler(
     string logDir,
     LogFileNameComposer logFileNameComposer,
     IFileSystem fileSystem,
     TLogItem headerLogItem,
     int rollFileSizeThreshold = DEFAULT_ROLL_FILE_SIZE_THRESHOLD)
 {
     _logDir = logDir;
     _logFileNameComposer   = logFileNameComposer;
     _fileSystem            = fileSystem;
     _headerLogItem         = headerLogItem;
     _rollFileSizeThreshold = rollFileSizeThreshold;
 }