az webapp log

Manage web app logs.

Commands

az webapp log config

Configure logging for a web app.

az webapp log deployment

Manage web app deployment logs.

az webapp log deployment list

List deployments associated with web app.

az webapp log deployment show

Show deployment logs of the latest deployment, or a specific deployment if deployment-id is specified.

az webapp log download

Download a web app's log history as a zip file.

az webapp log show

Get the details of a web app's logging configuration.

az webapp log tail

Start live log tracing for a web app.

az webapp log config

Configure logging for a web app.

az webapp log config [--application-logging {azureblobstorage, filesystem, off}]
                     [--detailed-error-messages {false, true}]
                     [--docker-container-logging {filesystem, off}]
                     [--failed-request-tracing {false, true}]
                     [--ids]
                     [--level {error, information, verbose, warning}]
                     [--name]
                     [--resource-group]
                     [--slot]
                     [--subscription]
                     [--web-server-logging {filesystem, off}]

Examples

Configure logging for a web app. (autogenerated)

az webapp log config --name MyWebapp --resource-group MyResourceGroup --web-server-logging off

Configure logging for a web app. (autogenerated)

az webapp log config --docker-container-logging off --name MyWebapp --resource-group MyResourceGroup

Optional Parameters

--application-logging

Configure application logging.

accepted values: azureblobstorage, filesystem, off
--detailed-error-messages

Configure detailed error messages.

accepted values: false, true
--docker-container-logging

Configure gathering STDOUT and STDERR output from container.

accepted values: filesystem, off
--failed-request-tracing

Configure failed request tracing.

accepted values: false, true
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--level

Logging level.

accepted values: error, information, verbose, warning
--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--web-server-logging

Configure Web server logging.

accepted values: filesystem, off

az webapp log download

Download a web app's log history as a zip file.

This command may not work with web apps running on Linux.

az webapp log download [--ids]
                       [--log-file]
                       [--name]
                       [--resource-group]
                       [--slot]
                       [--subscription]

Examples

Download a web app's log history as a zip file. (autogenerated)

az webapp log download --name MyWebApp --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--log-file

The downloaded zipped log file path.

default value: webapp_logs.zip
--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az webapp log show

Get the details of a web app's logging configuration.

az webapp log show [--ids]
                   [--name]
                   [--query-examples]
                   [--resource-group]
                   [--slot]
                   [--subscription]

Examples

Get the details of a web app's logging configuration. (autogenerated)

az webapp log show --name MyWebApp --resource-group MyResourceGroup

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az webapp log tail

Start live log tracing for a web app.

This command may not work with web apps running on Linux.

az webapp log tail [--ids]
                   [--name]
                   [--provider]
                   [--resource-group]
                   [--slot]
                   [--subscription]

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--provider

By default all live traces configured by az webapp log config will be shown, but you can scope to certain providers/folders, e.g. 'application', 'http', etc. For details, check out https://github.com/projectkudu/kudu/wiki/Diagnostic-Log-Stream.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

The name of the slot. Default to the productions slot if not specified.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.