# CaptureConsole | Sentry for Cloud Functions for Firebase

*Import name: `Sentry.captureConsoleIntegration`*

This integration captures all Console API calls and redirects them to Sentry using the SDK's captureMessage or captureException call, depending on the log level. It then re-triggers to preserve default native behavior:

```javascript
import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: "___PUBLIC_DSN___",
  integrations: [Sentry.captureConsoleIntegration()],
});
```

## [Options](https://docs.sentry.io/platforms/javascript/guides/firebase/configuration/integrations/captureconsole.md#options)

### [`levels`](https://docs.sentry.io/platforms/javascript/guides/firebase/configuration/integrations/captureconsole.md#levels)

*Type: `string[]`*

Array of methods that should be captured. Defaults to `['log', 'info', 'warn', 'error', 'debug', 'assert']`
