JSPM

combarnea-winston-console-formatter

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 33
  • Score
    100M100P100Q62417F
  • License MIT

Pretty print console formatter in yaml like style

Package Exports

  • combarnea-winston-console-formatter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (combarnea-winston-console-formatter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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({
    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');