Example #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);
        }
        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);
        }
        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);
        }
Example #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;
 }