winston-transmission

2.3.3 • Public • Published

Winston Transmission

npm version

A Custom Logger build on top of Winston.

  • Console
  • Sentry
  • Papertrail
  • Rollbar
  • Bugsnag
  • Isomorphic using raven-js raven-node
npm install winston-transmission

Usage and Configs

To use winston as is, install this dependency in your project:

Basic

The basic configurations only reports to the console, the default logging level is info.

import winstonTransmission from 'winston-transmission';

const logger = winstonTransmission({
  logLevel: 'info',
});

logger.info("Hello World!");

Sentry

To use sentry, install this dependency in your project:

npm install raven

Usage

import winstonTransmission from 'winston-transmission';

global.winston = winstonTransmission({
  logLevel: 'info',
  processName: 'My Awesome App',
  external: {
    logLevel: 'warn',
    sentry: 'SENTRY-KEY-XXXX',
  },
})

npm log-levels Assumption

Winston Transmission assumes npm log-levels, and bases its logging upon it.

Each level is given a specific integer priority. The higher the priority the more important the message is considered to be. Ordered from highest priority to the lowest:

error | warn | info | verbose | debug | silly

Readme

Keywords

none

Package Sidebar

Install

npm i winston-transmission

Weekly Downloads

1

Version

2.3.3

License

MIT

Unpacked Size

148 kB

Total Files

9

Last publish

Collaborators

  • bamieh