console-to-winston-newrelic
v1.0.4
Published
[![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![MIT License][license-image]][license-url]
Downloads
3
Maintainers
Readme
[![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![MIT License][license-image]][license-url]
Console to Winston new relic
Replace generic console to winston log configurated with new relic
- console.log level is replaced by logger.info
Installation
Use npm .
npm install console-to-winston-newrelic --save
Usage
Use all log levels and default winston logger
require('console-to-winston-newrelic')()
Specify log levels and logger
require('console-to-winston-newrelic')( {
logger: myLogger, //Specify a winston logger
logLevels: ['info', 'error'] //Replace only console.info and console.error to logger
})