Skip to content

rudouglas/winston-to-newrelic-logs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winston-to-newrelic-logs

Build Status

A newrelic transport for winston that sends logs to New Relic's Log Product

Installation

Tested on node-6.x, requires npm.

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

Usage

const winston = require('winston');
const NRLogsWinston = require('winston-to-newrelic-logs');
const logger = winston.createLogger({
    transports: [
      new NewrelicWinston({ 
        licenseKey: process.env.NR_LICENCE, 
        apiUrl: 'https://log-api.newrelic.com' 
      }),
    ]
});

logger.log({
    level: 'info',
    message: 'Message'
  });

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%