public BlobOutput(BaseLogger logger, string connectionString, string containerName) { _logger = logger; _batchSize = 10000; _flushDuration = TimeSpan.FromMilliseconds(5); _lastUploadTime = DateTime.UtcNow; _nextBatch = new List <IDictionary <string, object> >(); Completed = new AutoResetEvent(false); if (!string.IsNullOrEmpty(connectionString) && !string.IsNullOrEmpty(containerName)) { _blobServiceClient = new BlobServiceClient(connectionString); _blobContainerClient = _blobServiceClient.GetBlobContainerClient(containerName); _blobContainerClient.CreateIfNotExists(); } else { _logger.Log(LogLevel.ERROR, $"ERROR setting up connection to Blob. Please double check the information provided."); _error = true; } }
public ConsoleJsonOutput(BaseLogger logger) { _running = true; _logger = logger; }