Prompt file imported from ivegamsft/teams-meeting-fetcher (
.github/prompts/tail-logs.prompt.md). Copyright stays with the author.
Tail Logs — Multi-Cloud Log Watcher
Purpose
Launch and manage log streams from AWS CloudWatch, Azure Monitor, and local dev — all in background terminals for live debugging.
Instructions
Step 1: Ask What to Watch
Present options:
- AWS Lambda logs (main handler)
- AWS Authorizer logs (API Gateway authorizer)
- AWS API Gateway access logs
- Azure App Service logs (if deployed)
- All AWS logs (combined)
- Local dev server (
npm run dev)
Step 2: Launch Log Watchers
For each selected target, start a background terminal:
AWS Lambda (main):
aws logs tail /aws/lambda/<lambda_function_name> --follow --format short --profile tmf-dev
AWS Authorizer:
aws logs tail /aws/lambda/<authorizer_function_name> --follow --format short --profile tmf-dev
AWS API Gateway:
aws logs tail "API-Gateway-Execution-Logs_<api_id>/<stage>" --follow --format short --profile tmf-dev
Azure (if applicable):
az webapp log tail --name <app-name> --resource-group <rg-name>
Get the function/API names from Terraform output:
cd iac/aws && terraform output -json
Step 3: Monitor & Filter
If I report an issue, help me search the logs:
aws logs filter-log-events --log-group-name /aws/lambda/<name> --filter-pattern "ERROR" --start-time <epoch-ms> --profile tmf-dev
Common filter patterns:
"ERROR"— Errors"WARN"— Warnings"validationToken"— Subscription validation events"callRecords"— Meeting event webhooks"transcript"— Transcription events"401"or"403"— Auth failures
Rules
- Always use
--profile tmf-devfor AWS CLI. - Launch log watchers as background processes so they don't block the terminal.
- Use
--format shortfor readable output. - If asked to check recent logs (not live), use
--since 1hor--since 30minstead of--follow.