Another way to specify the storage account for storing application-specific diagnostic data is by specifying the storage account in the ServiceConfiguration.cscfg file. This is also convenient as during development time itself, you can specify the storage account. It is also possible to specify an altogether different storage account during development and production. The Azure storage account might also be configured as one of the dynamic environment variables during the deployment process.
The account information is defined as a connection string in a configuration setting. The following example shows the default connection string created for a new microservice project in Visual Studio:
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.
Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
</span></ConfigurationSettings>
You can change this connection string to provide account information for an Azure storage account.
Now, let's see how Azure storage stores the diagnostic data. All the log entries are stored in either a blob or table storage container. The storage choice can be specified while we create and associate the Azure storage container.