---
title: "Reference: Logs API | Client SDK"
description: Learn how to access and query system logs and debugging information in Mastra using the client-js SDK.
packages:
  - "@mastra/client-js"
---

# Logs API

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

## Getting Logs

Retrieve system logs with optional filtering:

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

## Getting Logs for a Specific Run

Retrieve logs for a specific execution run:

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