> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getdecipher.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Logs

> Learn how to set up capture for console/application logs.

<Check>**⏱ Estimated Time To Completion: 2 minutes**</Check>

## Add `captureConsoleIntegration` to your initialization

To automatically begin capturing console API calls, simply add `Sentry.captureConsoleIntegration` to your
existing `Sentry.init` call.

```typescript sentry.client.config.ts theme={null}
Sentry.init({
    // ... (existing setup)
    Sentry.captureConsoleIntegration(), // Add this to capture logs
});
```

You may pass a `levels` arg to `captureConsoleIntegration` in order to customize log levels that are captured.

```typescript sentry.client.config.ts theme={null}
Sentry.init({
    // ... (existing setup)
    // Only capture warning and error-level logs.
    Sentry.captureConsoleIntegration({ levels: ['warn', 'error'] }),
});
```

That's it! Decipher will automatically capture the configured logs and include them in session replays.
