azd app logs

View logs from running services with filtering and follow support.

Usage

Terminal window
azd app logs [flags]

Flags

FlagShortTypeDefaultDescription
--follow-fboolfalseFollow log output (tail -f behavior)
--source-stringlocalLog source: `local`, `azure`, or `all`
--service-sstring-Filter by service name(s) (comma-separated)
--tail-nint100Number of lines to show from the end
--since-string-Show logs since duration (e.g., 5m, 1h)
--timestamps-booltrueShow timestamps with each log entry
--no-color-boolfalseDisable colored output
--level-stringallFilter by log level (info, warn, error, debug, all)
--context-int0Number of context lines before/after matching entries (0-10, requires --level)
--format-stringtextOutput format (text, json)
--file-string-Write logs to file instead of stdout
--exclude-string-Regex patterns to exclude (comma-separated)
--no-builtins-boolfalseDisable built-in filter patterns

Examples

Terminal window
azd app logs [flags]
Terminal window
azd app run # Start services first
Terminal window
azd app logs # View logs from all services
Terminal window
azd app logs --follow # Follow logs in real-time
Terminal window
azd app logs --source azure # View logs from Azure
Terminal window
azd app logs --source azure -f # Stream Azure logs (polls every 30s)
Terminal window
azd app logs --source azure --since 1h # Logs from last hour
Terminal window
azd app logs --service web,api
Terminal window
azd app logs --tail 50
Terminal window
azd app logs --since 5m

📚 Detailed Documentation

For complete documentation including flows, diagrams, and advanced usage, see the full command specification.

View full logs specification →