logtown-winston3
v2.4.5
Published
Logtown wrapper for winston logger
Downloads
11
Maintainers
Readme
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.