In addition to the storage connection, you can also specify: WriteTo.AzureBlobStorage(connectionStringName: "M圜onnectionString", context.Configuration) UseSerilog((context, services, configuration) => configuration Public static IHostBuilder CreateHostBuilder(string args) => You can avoid manually creating an IConfiguration if you use Two-stage Initialization or you have established dependency injection for IConfiguration. WriteTo.AzureBlobStorage(connectionStringName: "m圜onnection", config) IConfigurationRoot config = builder.Build() AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) This example uses a named connection string called "m圜onnection". You must also provide an IConfiguration instance, either manually in the constructor or through dependency injection. You can also specify a named connection string, using the connectionStringName property in the constructor. Usage var cloudAccount = CloudStorageAccount.Parse("ConnectionString") The AzureBlobStorage sink appends data to the blob in text format. For this reason, appending blobs are ideal for logging applications. Writes to a file in Windows Azure Blob Storage.Īzure Blob Storage offers appending blobs, which allow you to add content quickly to a single blob without locking it for updates.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |