Skip to main content
Mastra v1 is coming in January 2026. Get ahead by starting new projects with the beta or upgrade your existing project today.

Logs API

The Logs API provides methods to access and query system logs and debugging information in Mastra.

Getting LogsDirect link to Getting Logs

Retrieve system logs with optional filtering:

const logs = await mastraClient.listLogs({
transportId: "transport-1",
});

Getting Logs for a Specific RunDirect link to Getting Logs for a Specific Run

Retrieve logs for a specific execution run:

const runLogs = await mastraClient.getLogForRun({
runId: "run-1",
transportId: "transport-1",
});

On this page