Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including newrelic-winston with all npm packages installed. Try it out:

var newrelicWinston = require("newrelic-winston")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

newrelic-winston v2.1.0

A newrelic transport for winston

newrelic-winston Build Status

A newrelic transport for winston including the newrelic Library


Tested on node-6.x, requires npm.

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


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


const { createLogger } = require('winston');
const NewrelicWinston = require('newrelic-winston');
const logger = createLogger({
    transports: [
        new NewrelicWinston(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 ;)


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

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free