CmdID

CmdID / az / az containerapp / az containerapp logs

az containerapp logs show

Show past logs and/or print logs in real time (with the --follow parameter). Azure CLI reference

4 examples 9 options Its page in the Azure CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Fetch the past 20 lines of logs from an app and return

az containerapp logs show -n my-containerapp -g MyResourceGroupIdentify
-nThe name of the Containerapp.
-gName of resource group.

Fetch the past 20 lines of system logs from an app and return

az containerapp logs show -n my-containerapp -g MyResourceGroup --type systemIdentify
-nThe name of the Containerapp.
-gName of resource group.
--typeType of logs to stream

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 30Identify
-nThe name of the Containerapp.
-gName of resource group.
--followPrint logs in real time if present.
--tailThe number of past logs to print (0-300)

Fetch logs for a particular revision, replica, and container

az containerapp logs show -n my-containerapp -g MyResourceGroup --replica MyReplica --revision MyRevision --container MyContainerIdentify
-nThe name of the Containerapp.
-gName of resource group.
--replicaThe name of the replica.
--revisionThe name of the container app revision.
--containerThe name of the container

Options

9 in the Azure CLI reference
--containerThe name of the container
--followPrint logs in real time if present.
--formatLog output format
--name, -nThe name of the Containerapp.
--replicaThe name of the replica.
--resource-group, -gName of resource group.
--revisionThe name of the container app revision.
--tailThe number of past logs to print (0-300)
--type, -tType of logs to stream