public void InvalidStdErrStream_Throws_ArgumentException(string value)
        {
            var storage = new KongoDataStorage($"Data Source={Path.GetRandomFileName()}");

            storage.Database.EnsureCreated();
            _processor = new StdErrorProcessor(storage);
            storage.Database.EnsureDeleted();
            Assert.ThrowsAsync <ArgumentException>(() => _processor.IngestLogEntry(value, 1));
        }
예제 #2
0
        //private readonly NodeConfigurationModel _nodeConfiguration;

        public ProcessStdErr(ILogger <ProcessStdErr> logger, LogIngestionConfigModel logIngestionConfig, IProcessStdError processor, KongoOptions opts)
        {
            _logger             = logger;
            _processor          = processor;
            _opts               = opts;
            _watcher            = new FileSystemWatcher();
            _logIngestionConfig = logIngestionConfig;
            _stopwatch          = new Stopwatch();
            _sb = new StringBuilder();
        }
        public async Task ProcessValidStdErrStream(string value)
        {
            var storage = new KongoDataStorage($"Data Source={Path.GetRandomFileName()}");

            storage.Database.EnsureCreated();
            _processor = new StdErrorProcessor(storage);
            await _processor.IngestLogEntry(value, 1);

            var logs = await _processor.ProcessIngestedLogs();

            storage.Database.EnsureDeleted();
        }