Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 710 Bytes

README.md

File metadata and controls

29 lines (23 loc) · 710 Bytes

winston-newrelic-logs-transport

A newrelic Logs API transport for winston.

Installation

Tested on node-14.x.

  $ npm install winston-newrelic-logs-transport --save

Usage

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,
        }),
    ],
});

Options

  • licenseKey: New Relic license key.
  • apiUrl: New Relic Log Base API URL.