Package Exports
- node-color-log
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 (node-color-log) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Node Color Log
The more powerful logger for NodeJS.
node-color-log
is a package for NodeJS. It provides more functions than the origin console.log
. You can log text with colorful font and colorful background. Also, it has four levels log, including debug
, info
, warn
and error
. Give you much better experience while developing NodeJS projects.
Demo
Usage
const Logger = require('node-color-log');
const logger = new Logger();
// Both font and background color including:
// 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white'
// normal
logger.log(message)
// set font color
logger.fontColor('red', message);
// set background color
logger.bgColor('yellow', message);
// set font and background color
logger.setColor({
font: 'black',
bg: 'yellow'
}, message);
// Degug level, with prefix "DEBUG: "
logger.degug(message);
// Error level, with prefix "ERROR: "
logger.error(message);
// Info level, with prefix "INFO: "
logger.info(message);
// Warn level, with prefix "WARN: "
logger.warn(message);
Lisense
MIT