Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/platforms/react-native/configuration/options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,16 @@ Allows the choice of which logs are captured: `native` for logs from native code

</SdkOption>

<SdkOption name="enableAutoConsoleLogs" type="boolean" defaultValue="true">

When `enableLogs` is `true`, the SDK automatically captures `console.*` calls as logs via the `ConsoleLogs` integration. Set this to `false` to disable the automatic console capture while still being able to send logs manually via `Sentry.logger.*`.

Has no effect when `enableLogs` is `false` or `logsOrigin` is `'native'`.

(New in version 8.14.0)

</SdkOption>

## Integration Configuration

For many platform SDKs integrations can be configured alongside it. On some platforms that happen as part of the `init()` call, in some others, different patterns apply.
Expand Down
13 changes: 12 additions & 1 deletion docs/platforms/react-native/integrations/console-logging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ Console Logging integration is enabled by default which means calls to the `cons

## Disabling Console Logging Integration

To disable the integration, filter it out from the integrations array:
Since version 8.14.0, you can disable the integration with the `enableAutoConsoleLogs` option. `Sentry.logger.*` calls still work as expected:

```js
Sentry.init({
...,
enableLogs: true,
enableAutoConsoleLogs: false,
...
})
```

On earlier versions, filter the integration out of the integrations array:

```js
Sentry.init({
Expand Down
Loading