@loglayer/transport-roarr
v1.0.8
Published
roarr transport for loglayer.
Downloads
631
Maintainers
Readme
Roarr Transport for LogLayer
The Roarr transport for LogLayer.
Roarr is a JSON logger for Node.js and browser environments.
Installation
npm install loglayer @loglayer/transport-roarr roarr serialize-error
Usage
Node.js Environment Setup
ROARR_LOG=true node your-app.js
Browser Environment Setup
window.ROARR = {
enabled: true
}
Implementation
import { Roarr as r } from 'roarr'
import { LogLayer } from 'loglayer'
import { RoarrTransport } from "@loglayer/transport-roarr"
import { serializeError } from 'serialize-error'
const log = new LogLayer({
transport: new RoarrTransport({
logger: r
}),
errorSerializer: serializeError // Roarr requires error serialization
})
Documentation
For more details, visit https://loglayer.dev/transports/roarr