I am using Visual Studio 2015. In order to configure diagnostics for my worker role for Azure SDK 2.7.1 I added diagnostics.wadcfgx
file by right clicking on worker role in Azure project and selecting Add Diagnostic Configuration
.
The newly created file contains some initial configuration, including
<PrivateConfig>
<StorageAccount name="" key="" endpoint="" />
</PrivateConfig>
And
<StorageAccount></StorageAccount>
Should I put any values in here or I can only specify:
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="[CONN STRING]" />
for every environment and it would be enough?
You don't need to manually change any XML files for your storage account. The article at https://msdn.microsoft.com/en-us/library/azure/dn186185.aspx#BKBM_Changes describes how Visual Studio will pick the storage account. Essentially here is the order of precedence:
Also in Visual Studio you can go to the Role Properties dialog (right-click the Role under the Roles node in the cloud service project and select properties) and you can manually choose the storage account using the UI.