The Roarr transport for the LogLayer logging library.
Roarr is a JSON logger for Node.js and browser environments.
npm install loglayer @loglayer/transport-roarr roarr serialize-error
ROARR_LOG=true node your-app.js
window.ROARR = {
enabled: true
}
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
})
For more details, visit https://loglayer.dev/transports/roarr