> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Logs

> `composio.logs` — tool-execution logs.

## Usage

Access this class through the `composio.logs` property:

```typescript theme={null}
const composio = new Composio({ apiKey: 'your-api-key' });
const result = await composio.logs.list();
```

## Methods

### get()

Retrieve one tool-execution log with its full detail (timings, context, source and raw `data`).

```typescript theme={null}
async get(id: string, requestOptions?: ComposioRequestOptions): Promise<ToolExecutionLogDetail>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `id` | `string` | The log id |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<ToolExecutionLogDetail>` — The log detail, with an optional exact USD charge in `metadata.instant_charge`

**Example**

```typescript theme={null}
const log = await composio.logs.get('log_abc123');
console.log(log.status, log.timings?.endTime);
```

***

### search()

Search tool-execution logs with filters, a time range and cursor pagination.

```typescript theme={null}
async search(params?: LogSearchParams, requestOptions?: ComposioRequestOptions): Promise<LogSearchResponse>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `params?` | `LogSearchParams` | Filters, `timeRange`, `limit` and `cursor` |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<LogSearchResponse>` — Matching logs and the next cursor. Charged calls include `metadata.instant_charge` as an exact USD string.

**Example**

```typescript theme={null}
const { logs } = await composio.logs.search({
  filters: [
    { field: 'status', operator: '==', value: 'failed' },
    { field: 'user_id', operator: '==', value: 'user_123' },
  ],
  timeRange: { from: Date.now() - 24 * 60 * 60 * 1000, to: Date.now() },
});
```

***
