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
View logs for a specific sandbox (last 1 hour - default)
bl logs sandbox my-sandboxView logs for a specific process in a sandbox
bl logs sandbox my-sandbox my-processStream process logs in real-time
bl logs sandbox my-sandbox my-process —followView all logs for a job
bl logs job my-jobView logs for a specific job execution
bl logs job my-job exec-abc123View logs for a specific task within an execution
bl logs job my-job exec-abc123 task-456Follow job execution logs in real-time
bl logs job my-job exec-abc123 —followFollow 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 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”Using 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.
