bl logs
View logs for a resourceSynopsis
View logs for Blaxel resources. The logs command displays logs for agents, jobs, sandboxes, and functions. You must specify both the resource type and resource name. Resource Types (with aliases):- sandboxes (sandbox, sbx)
- jobs (job, j, jb)
- agents (agent, ag)
- functions (function, fn, mcp, mcps)
- Using duration format (e.g., 3d, 1h, 10m, 24h) with —period flag
- Using explicit start/end times with —start and —end flags
- Maximum time range is 3 days
- d: days
- h: hours
- m: minutes
- s: seconds
- —task-id: Filter logs for a specific task ID
- —execution-id: Filter logs for a specific execution ID
View logs for a specific sandbox (last 1 hour - default)
bl logs sandbox my-sandboxFollow logs in real-time (shows last 15 minutes, then streams new logs)
bl logs sandbox my-sandbox —followFollow logs with more historical context
bl logs sandbox my-sandbox —follow —period 1hView logs from last 3 days
bl logs job my-job —period 3dView logs with 1 hour period (explicit)
bl logs sandbox my-sandbox —period 1hView logs for a specific time range
bl logs agent my-agent —start 2024-01-01T00:00:00Z —end 2024-01-01T23:59:59ZHide timestamps in output
bl logs agent my-agent —no-timestampsShow timestamps in UTC
bl logs agent my-agent —utcFilter by severity
bl logs agent my-agent —severity ERROR,FATALSearch for specific text in logs
bl logs agent my-agent —search “error”Filter job logs by task ID
bl logs job my-job —task-id task-123Filter job logs by execution ID
bl logs job my-job —execution-id exec-456Combine filters
bl logs job my-job —severity ERROR —search “timeout” —task-id task-123Using aliases
bl logs sbx my-sandbox —follow bl logs j my-job —period 1h bl logs fn my-function —followOptions
Options inherited from parent commands
SEE ALSO
- bl - Blaxel CLI is a command line tool to interact with Blaxel APIs.
