nodejs-color-logger
v3.1.1
Published
A simple but powerfull way to style the output of you logs with colors and also severall styles
Downloads
119
Maintainers
Readme
nodejs-color-logger
Simple and easy to use console log utilty for node.js applications
Functions
.color('color')
.style('style')
.type('type')
.timestamp('format [optional]')
.log(...args)
Examples
logger.color('green').log('Connected to Socket')
logger.type('debug').color('brightGreen').log('Connected to Socket')
logger.style('underscore').log('Connected to Socket')
logger.type('info').timestamp().style('italic').color('green').log("Connected to Socket")
The positioning of the elments doesnt matter with one execption, the log function have to called at least position.
Options
| colors | styles | types | |--------|--------|-------| | black | bold | success | | red | dim | error | | green | italic | warning | | yellow | underscore | info | | blue | reverse | debug | | magenta | hidden | | | cyan | strikethrough | | | white | backoneline | |
INFO: You can use every color as brighter version by adding a bright before and capitalize the first letter of the color