az containerapp logs
Show container app logs.
Commands
Name | Description | Type | Status |
---|---|---|---|
az containerapp logs show |
Show past logs and/or print logs in real time (with the --follow parameter). Note that the logs are only taken from one revision, replica, and container (for non-system logs). |
Core | GA |
az containerapp logs show
Show past logs and/or print logs in real time (with the --follow parameter). Note that the logs are only taken from one revision, replica, and container (for non-system logs).
az containerapp logs show --name
--resource-group
[--container]
[--follow {false, true}]
[--format {json, text}]
[--replica]
[--revision]
[--tail]
[--type {console, system}]
Examples
Fetch the past 20 lines of logs from an app and return
az containerapp logs show -n my-containerapp -g MyResourceGroup
Fetch the past 20 lines of system logs from an app and return
az containerapp logs show -n my-containerapp -g MyResourceGroup --type system
Fetch 30 lines of past logs logs from an app and print logs as they come in
az containerapp logs show -n my-containerapp -g MyResourceGroup --follow --tail 30
Fetch logs for a particular revision, replica, and container
az containerapp logs show -n my-containerapp -g MyResourceGroup --replica MyReplica --revision MyRevision --container MyContainer
Required Parameters
The name of the Containerapp.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The name of the container.
Print logs in real time if present.
Log output format.
The name of the replica. List replicas with 'az containerapp replica list'. A replica may not exist if there is not traffic to your app.
The name of the container app revision. Defaults to the latest revision.
The number of past logs to print (0-300).
Type of logs to stream.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.