winston-newrelic-logs-transport
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

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.
  • axiosOptions: Options passed to Axios when sending data. (Optional)
  • batchSize: How many log items you would like to bundle together before posting to loggly. (Optional, positive integer or true, default 100)
  • batchThrottle: The maximum frequency the batch posting should occur unless the batch size is exceeded. (Optional, positive integer or true, default 1000)

Batching

If either batching option is set without the other, or simply set as true then default values are used as specified.

/winston-newrelic-logs-transport/

    Package Sidebar

    Install

    npm i winston-newrelic-logs-transport

    Weekly Downloads

    4,281

    Version

    1.3.1

    License

    MIT

    Unpacked Size

    46.2 kB

    Total Files

    23

    Last publish

    Collaborators

    • joaolrpaulo