npm.io
0.1.0 • Published 8 years ago

@febbyjs/logger

Licence
MIT
Version
0.1.0
Deps
1
Size
1.5 MB
Vulns
0
Weekly
0

Table of Contents

log

To log user text as json object

Parameters

  • message log text
  • type type of log. ex: log,error,info,warning

Examples

logger.log('hello world', 'log');
//log output
{ type: 'log', message: 'hello world' }

error

To log error text with red color

Parameters

  • message log text

Examples

logger.error('hello world');

success

To log success text with green color

Parameters

  • message log text

Examples

logger.success('hello world');

info

To log info text with blue color

Parameters

  • message log text

Examples

logger.info('hello world');

warning

To log a warning with yellow color

Parameters

  • message log text

Examples

logger.warning('hello world');

customLog

To log text with given rgb color code or color name

Parameters

  • message log text
  • color color [ black, red, green, yellow, blue, magenta, cyan, white, gray ("bright black"), redBright, greenBright, yellowBright, blueBright, magentaBright, yanBright, whiteBright ]

Examples

logger.customLog('hello world','magentaBright');

Keywords