1.1.0 • Published 2 years ago
@totalsoft/pino-correlation v1.1.0
pino-correlation
This package provides a pino mixin for setting the correlation id property on the log event.
Installation
npm i @totalsoft/pino-correlation
or
yarn add @totalsoft/pino-correlation
Usage
const { correlationMixin } = require('@totalsoft/pino-correlation');
import { pino } from 'pino'
const options = {
mixin(_context, _level) {
return correlationMixin()
}
}
const logger = pino(options);
1.1.0
2 years ago