A newrelic Logs API transport for winston.
Tested on node-14.x.
$ npm install winston-newrelic-logs-transport --save
import { createLogger } from 'winston';
import WinstonNewrelicLogsTransport from 'winston-newrelic-logs-transport';
const logger = createLogger({
transports: [
new WinstonNewrelicLogsTransport({
licenseKey: process.env.NEW_RELIC_LICENSE_KEY,
apiUrl: process.env.NEW_RELIC_API_URL,
}),
],
});
- licenseKey: New Relic license key.
- apiUrl: New Relic Log Base API URL.