1.0.0 • Published 4 years ago

@loghouse/pino-browser v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

loghouse-pino-browser

This package provides a transport for pino that forwards browser logs to the Loghouse.

Installation

$ npm install @loghouse/pino-browser

Configuration

Example:

const { writeBrowserLog } = require('@loghouse/pino-browser')

const logger = require('pino')({
  browser: {
    write: writeBrowserLog({
      accessToken: "${ACCESS_TOKEN}",
      bucketId: "${BUCKET_ID}",
      enabledConsoleOutput: true | false
    })
  }
})

logger.info('test log')

accessToken

Type: String (required)

Access token, found on your team's Loghouse page.

bucketId

Type: String (required)

Bucket id, located on your team's Loghouse page, opposite the bucket name.

enabledConsoleOutput

Type: Boolean

This parameter is responsible for outputting logs to the browser console.

1.0.0

4 years ago