combarnea-winston-console-formatter
v1.0.1
Published
Pretty print console formatter in yaml like style
Downloads
181
Maintainers
Readme
Winston console formatter
Default winston log levels with message:
It's look's like yaml \o/
This is custom config for default winston console transform.
npm install winston-console-formatter
var winston = require('winston');
var toYAML = require('winston-console-formatter');
var logger = new winston.Logger({
level: 'silly'
});
logger.add(winston.transports.Console, toYAML.config({
colors, // colorizer colors array
noMeta, // boolean - not to print metadata, if true metadata will not be printed
noStack // boolean - not to print stack trace, if true stack trace will not be printed
}));
logger.log('error', 'message');
logger.log('warn', 'message');
logger.log('info', 'message');
logger.log('verbose', 'message');
logger.log('debug', 'message');
logger.log('silly', 'message');