azd app logs
View logs from running services with filtering and follow support.
Usage
azd app logs [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--follow | -f | bool | false | Follow log output (tail -f behavior) |
--source | - | string | local | Log source: `local`, `azure`, or `all` |
--service | -s | string | - | Filter by service name(s) (comma-separated) |
--tail | -n | int | 100 | Number of lines to show from the end |
--since | - | string | - | Show logs since duration (e.g., 5m, 1h) |
--timestamps | - | bool | true | Show timestamps with each log entry |
--no-timestamps | - | bool | false | Hide timestamps in text log output |
--no-color | - | bool | false | Disable colored output |
--level | - | string | all | Filter by log level (info, warn, error, debug, all) |
--min-level | - | string | - | Show entries at this severity or higher (`debug` < `info` < `warn` < `error`); cannot be combined with an explicit `--level` or `--context` |
--summary | - | bool | false | Show counts by service and level instead of raw log entries |
--context | - | int | 0 | Number of context lines before/after matching entries (0-10, requires --level) |
--format | - | string | text | Output format (text, json) |
--file | - | string | - | Write logs to file instead of stdout |
--exclude | - | string | - | Regex patterns to exclude (comma-separated) |
--grep | - | string | - | Only show log lines matching this regex (applied after `--exclude`) |
--alerts | - | bool | false | Raise alerts for log lines matching built-in patterns (panic, unhandled exception, fatal) |
--redact | - | bool | false | Redact secret-shaped values before printing logs |
--no-builtins | - | bool | false | Disable built-in filter patterns |
Examples
azd app logs [flags]azd app run # Start services firstazd app logs # View logs from all servicesazd app logs --follow # Follow logs in real-timeazd app logs --source azure # View logs from Azureazd app logs --source azure -f # Stream Azure logs (polls every 30s)azd app logs --source azure --since 1h # Logs from last hourazd app logs --service web,apiazd app logs --tail 50azd app logs --since 5mDetailed Documentation
For complete documentation including flows, diagrams, and advanced usage, see the full command specification.
View full logs specification →