Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

plogger

papo849MIT1.0.1

node log package to log message to console with colors based on the message type

log, logger, plogger, node, npm

readme

plogger

Description

node log package to log message to console with colors based on the message type

Installation

$ npm install plogger

Usage

global.logger = require('plogger').log;

logger('debug', logLevel.DEBUG)
logger('info', logLevel.INFO)
logger('warning', logLevel.WARNING)
logger('error', logLevel.ERROR)
logger('fatal', logLevel.FATAL)

var initTest = function() {
  try {
    throw Exception('bad call');
  } catch (e) {
    logger(e);
  } finally {
    logger('done!');
  }
}
initTest();