npm

Need private packages and team management tools?Check out npm Orgs. »

newrelic-winston

2.1.0 • Public • Published

newrelic-winston Build Status

A newrelic transport for winston including the newrelic Library

Installation

Tested on node-6.x, requires npm.

  $ npm install winston --save
  $ npm install newrelic-winston --save

Usage

const winston = require('winston');
const NewrelicWinston = require('newrelic-winston');
winston.add(new NewrelicWinston(options));
 

or

const { createLogger } = require('winston');
const NewrelicWinston = require('newrelic-winston');
const logger = createLogger({
    transports: [
        new NewrelicWinston(options),
    ],
});

Options

  • env: the current evironment. Defatuls to process.env.NODE_ENV

If env is either 'dev' or 'test' the lib will not load the included newrelic module saving devs from anoying errors ;)

Config

Please refer to the newrelic lib's readme for specific module's configs.

Log Levels

This trasport is meant to report errors to newrelic, so the only level available in order to log something is error

All other possible winston's levels, or custom levels, will noop

install

npm i newrelic-winston

Downloadsweekly downloads

990

version

2.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability