CmdID / az / az containerapp / az containerapp env / az containerapp env logs
az containerapp env logs show
Show past environment logs and/or print logs in real time (with the --follow parameter) Azure CLI reference
2 examples 2 options Its page in the Azure CLI reference
Examples
Fetch the past 20 lines of logs from an app and return
az containerapp env logs show -n MyEnvironment -g MyResourceGroupIdentify-nName of the Container Apps environment.-gName of resource group.Fetch 30 lines of past logs logs from an environment and print logs as they come in
az containerapp env logs show -n MyEnvironment -g MyResourceGroup --follow --tail 30Identify-nName of the Container Apps environment.-gName of resource group.--followPrint logs in real time if present.--tailThe number of past logs to print (0-300)Options
--followPrint logs in real time if present.--tailThe number of past logs to print (0-300)