logtown-winston3

2.4.5 • Public • Published

logtown-winston

Logtown wrapper for winston logger

Installation

yarn add logtown-winston winston 

or

npm install logtown-winston winston

Usage

const logtown = require('logtown');
const WinstonWrapper = require('logtown-winston');
const winston = require('winston');
 
const customTransportsArray = [
    new winston.transports.Console({
      json: false,
      colorize: true,
      prettyPrint: true,
      timestamp: true,
      handleExceptions: true,
      align: false,
      level: 'silly'
    })
];
 
const customWinstonOptions = {exitOnError: false};
 
logtown.addWrapper(new WinstonWrapper(customTransportsArray, customWinstonOptions));

For reference of winston options see winston docs

ES5 usage

var WinstonWrapper = require('logtown-winston/es5');

License

Logtown-winston is released under the MIT license.

Donate

Package Sidebar

Install

npm i logtown-winston3

Weekly Downloads

0

Version

2.4.5

License

MIT

Unpacked Size

6.54 kB

Total Files

7

Last publish

Collaborators

  • hunterman