0
votes

I'm writing an Azure CLI bash script to create an Azure Web App, and I've got to the point where I need to configure logging. I know I can configure the logging, to an extent, with...

az webapp log config --name $webAppName
                     --resource-group $resourceGroupName
                     --level Verbose
                     --application-logging true
                     --detailed-error-messages true
                     --web-server-logging filesystem

As far as I can tell this should allow me to log whatever is sent through System.Debug.Trace....

This is where I get confused: My understanding is that these logs will be written to blob storage, and the documentation does explain how to enable this, but it doesn't explain how to enable this - or the retention policy - via the Azure CLI. Nor can I find any examples of how to do this except via the Azure portal.

So is my understanding as far as gathering the logging messages into a blob? And if so, how does one configure this via the Azure CLI?

1

1 Answers

2
votes

The cli az webapp log config currently does not support logging to blob storage, so you cannot configure it by using this cli command.

There is a github issue webapp: support storage for logging config for tracking this question, and it also provides a workaround.

Hope it helps.