clogsjs
v1.0.4
Published
Minimalistic NodeJS library for more informative output in the console.log
Downloads
3
Readme
cLogs.js
Minimalistic NodeJS library for more informative output in the console.log.
cLogs provides three colors for more informative display of logs. You can use:
Red - for the most important messages.
Green - to notify about completion of work or about a successfully received request.
Yellow - for warnings or implicit instructions.
You can also use cLogs without passing an argument. In this case, the output will be the default color of your shell.
cLogs also displays the current date and time using the dependency - moment.js
Installation
Use npm:
npm install clogsjs
Tutorial
Import cLogs into your application:
const cLogs = require('clogsjs');
cLogs('Error! User unavailable', 'red');
cLogs('Success! User sync complete', 'green');
cLogs('Warning! User structure not found', 'yellow');
cLogs('This is just a regular log');
Output:
License
cLogs.js is freely distributable under the terms of the MIT license.