How to enable diagnostics for a slot to Azure Table Storage?
I try:
> Enable-AzureWebsiteApplicationDiagnostic -Name mysite `
-LogLevel Verbose -Slot myslot -TableStorage `
-StorageAccountName 'mystorageaccountname'
fails:
ResourceNotFound: The storage account 'mystorageaccountname' was not found.
But it exists.
And when I do:
> Set-AzureRmCurrentStorageAccount –ResourceGroupName mygroup `
–StorageAccountName mystorageaccountname
> Enable-AzureWebsiteApplicationDiagnostic -Name mysite `
-LogLevel Verbose -Slot myslot -TableStorage
it fails:
Value cannot be null. Parameter name: accountName
whereas the doc says:
-StorageAccountName
Specifies the name of a storage account in which to store logs. The default value is the current storage account.
> gcm Enable-AzureWebsiteApplicationDiagnostic
CommandType Name Version Source
----------- ---- ------- ------
Cmdlet Enable-AzureWebsiteApplicationDiagnostic 5.3.0 azure
> get-module azure*
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 5.3.0 azure {Add-AzureAccount, Add-AzureApplicationGatewaySslCertif...
Script 4.3.2 Azure.Storage {Disable-AzureStorageDeleteRetentionPolicy, Enable-Azur...
Script 5.3.3 AzureRM.Profile {Add-AzureRmEnvironment, Clear-AzureRmContext, Clear-Az...
Script 5.0.0 AzureRM.Storage
Update. The same issue for the site.
> Enable-AzureWebsiteApplicationDiagnostic -Name mysite `
-LogLevel Verbose -BlobStorage -StorageBlobContainerName appslogs `
-StorageAccountName 'mystorageaccountname'