View and filter logs
~5 minutes
Marks this step as complete and saves your progress
The azd app logs command provides powerful log viewing and filtering
capabilities for debugging and monitoring your services.
View All Logs
Stream logs from all services in real-time:
bash
azd app logs View Logs for a Specific Service
Focus on logs from one service:
bash
azd app logs --service api Filter and Search Logs
Filter by Log Level
Show only errors:
bash
azd app logs --level error Time Range
Show logs from the last hour:
bash
azd app logs --since 1h Log Output Options
Follow Mode (Default)
Continuously stream new logs:
bash
azd app logs --follow Show Timestamps
bash
azd app logs --timestamps JSON Output
For programmatic parsing:
bash
azd app logs --format json Try It Yourself
Run `azd app logs --service api` to view logs from just the API service. Try `--level error` to filter for errors.
Expected: You should see a filtered stream of logs from the specified service.
Combining Filters
You can combine multiple filters:
bash
azd app logs --service api --level error --since 30m Export Logs
Save logs to a file for later analysis:
bash
azd app logs --file logs.txt Dashboard Logs
The dashboard also provides a log viewer with real-time filtering, search, and syntax highlighting. Access it via the Logs tab.