2.4.5 • Published 5 years ago

logtown-winston3 v2.4.5

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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

npm.io npm.io

2.4.5

5 years ago

2.4.4

6 years ago

2.4.0

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.0

6 years ago