az webapp log tail: Stream App Service Logs
az webapp log tail streams the live log output of an App Service app to your terminal.
When a deploy comes up unhealthy, tailing the logs shows the startup error in real time. In CI you must bound it so the step does not hang forever.
What it does
az webapp log tail connects to the App Service log stream and prints application and platform logs live. Filesystem logging must be enabled first with az webapp log config; otherwise the stream is empty.
Common usage
# enable filesystem logging once
az webapp log config -g rg-app -n web-ci \
--application-logging filesystem --level information
# stream, bounded so CI does not hang
timeout 60 az webapp log tail -g rg-app -n web-ciSubcommands and flags
| Subcommand / Flag | What it does |
|---|---|
| log tail | Stream live logs |
| log config | Enable and set the logging level |
| log download | Download a zip of recent logs |
| --provider | Filter to http, application, etc. |
| --resource-group, -g / --name, -n | Target app |
In CI
log tail blocks indefinitely, so always wrap it in timeout (or run it in the background and kill it) or the job will hang until the runner timeout. For post-mortems, log download grabs a zip you can attach as a build artifact instead of streaming.
Common errors in CI
An empty stream usually means filesystem logging is off; run az webapp log config first. A step that never finishes means log tail was run without a timeout. "ResourceNotFound" means a wrong app name or group; "AuthorizationFailed" means missing read access on the app.