Loading...
Loading...
Execute mcloud logs to fetch and stream runtime logs for Cloud environments. Use when reading backend or storefront logs, filtering by time range, searching for errors, or scoping logs to a specific deployment.
npx skill4agent add medusajs/medusa-agent-skills mcloud-logsmcloud logs--follow--json--from--to--json--followCtrl+Cmcloud logs \
--organization <org-id> \
--project <project-id-or-handle> \
--environment <environment-handle> \
[options]| Option | Description | Default |
|---|---|---|
| Organization ID | Active context |
| Project ID or handle | Active context |
| Environment handle | Active context |
| Stream logs continuously (incompatible with | |
| Max log lines (non-follow mode only) | |
| Start of time range (e.g. | 15 minutes ago |
| End of time range; if >15 min ago, must also pass | now |
| Filter by substring (same as dashboard search bar) | — |
| Filter by deployment or build ID | — |
| Filter by source (repeatable) | — |
| Filter by metadata field (repeatable; same key merges values) | — |
| Log stream to query | |
| Output as JSON (incompatible with | |
# Basic log fetch (last 500 lines, last 15 min)
mcloud logs --json
# Search for errors
mcloud logs --search error --limit 1000 --json
# Filter for HTTP 500 errors via metadata
mcloud logs --metadata status=500 --limit 1000 --json
# Logs for a specific deployment (build or deployment ID)
mcloud logs --deployment bld_01ABC123 --json
# Structured output for agent analysis
mcloud logs --search error --json | jq '.[] | {timestamp, source, message}'
# Storefront logs
mcloud logs --type storefront --json
# Stream live logs (human-readable, not for scripts)
mcloud logs --follow
# Logs within a specific time range
mcloud logs --from 2026-04-22T10:00:00Z --to 2026-04-22T11:00:00Z --limit 1000 --json
# Logs from a time until now
mcloud logs --from 2026-04-22T10:00:00Z --json
# Multiple source filters
mcloud logs --source api --source worker --json
# Multiple metadata filters (HTTP 4xx and 5xx)
mcloud logs --metadata status=400 --metadata status=500 --limit 500 --json--from--to--to--from--to--from--from--to