Download your Windows Azure publish settings file and import it and yes, this’s the most painful thing you’ll do here I promise!
Create new website called wawsrocks
Now we have a website created, to make sure it works fine use Show-AzureWebsite cmdlet like this
To enable the diagnostics on file system just execute Enable-AzureWebsiteApplicationDiagnostic (woof what a long name!). Then you make sure it’s enabled using Get-AzureWebsite cmdlet
I’ve picked Verbose logging level among the available options: Information, Error, Verbose and Warning.
At this moment, I can start enjoy watching everything happening on the website by executing Get-AzureWebsiteLog –Tail cmdlet!
The logs are saved on the the file system of the website and besides that you can change the behavior to make the logs go to Windows Azure Storage Table just by executing these cmdlets
The New-AzureStorageAcccount creates a storage account that will have the logs in a table called WAWSAppLogTable. In the future releases Windows Azure PowerShell will support a cmdlet to query the log entries and filter them.
In case you want to break up with application logging on file, execute this cmdlet
If you are so angry :@%#$Q you can also remove the website and the storage account
The complete listing of the cmdlets used to make this sample is found in this gist.
At the end, I hope you have happy logging weekend!