Skip to content

Overview ​

consoleIntegration turns every console.log, info, warn, error and debug call into a Buglapse log event of the matching level, so your existing console output shows up on the Logs page without rewriting it to Buglapse.log.*. The original console call still prints as usual.

Arguments are mapped the same way log.*() takes them: a trailing plain object becomes the log's attributes, everything before it is joined into the message.

ts
console.warn('Payment retry', 3, { orderId: 'A-1042' })
// → warn log "Payment retry 3" with attributes { orderId: 'A-1042' }

Usage ​

ts
import { use } from '@buglapse/browser'
import { consoleIntegration } from '@buglapse/browser/integrations'

use(consoleIntegration())

The integration takes no options.

Every console call becomes an event that counts toward your log quota — chatty debug output adds up quickly. If you only want console output as context for errors, use the console source of BreadcrumbsIntegration instead.