Skip to content

seanlindo/winston-console-formatter

 
 

Repository files navigation

Winston console formatter

Build Status Code Coverage

Default winston log levels with message:

Levels color

It's look's like yaml \o/

Meta object example

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());
  
  logger.log('error', 'message');
  logger.log('warn', 'message');
  logger.log('info', 'message');
  logger.log('verbose', 'message');
  logger.log('debug', 'message');
  logger.log('silly', 'message');

About

Pretty print console formatter in yaml like style

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%