Log streaming provides developers with visibility into process outputs within sandboxes.

Complete code examples demonstrating all operations are available on Blaxel’s GitHub: in TypeScript and in Python.

Retrieve logs

Batch

This allows you to retrieve logs for a specific process (using either its name or process ID) after it has completed execution. This is useful for analyzing process output or debugging issues:


import { SandboxInstance } from "@blaxel/core";

const sandbox = await SandboxInstance.get("my-sandbox")
const process = await sandbox.process.exec({name: "test", command: "echo 'Hello world'"})

const logs = await sandbox.process.logs("test");

Streaming

Coming in the next few days!