Skip to content

Console | Sentry for Next.js

Source URL: https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/console

This integration captures console logs as breadcrumbs (great for error context!). But if you need to search and query your logs across your entire application, use Sentry Logs instead. Set enableLogs: true, and add the Sentry console logging integration in your SDK config.

Import name: Sentry.consoleIntegration

This integration is enabled by default. If you’d like to modify your default integrations, read this.

The consoleIntegration generates breadcrumbs for console logs.

Sentry.init({
integrations: [Sentry.consoleIntegration()],
});