clogsjs

1.0.4 • Public • Published

cLogs.js

author-image NPM version js-image MIT License

logo

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:

output.png

License

cLogs.js is freely distributable under the terms of the MIT license.

Package Sidebar

Install

npm i clogsjs

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

4.53 kB

Total Files

4

Last publish

Collaborators

  • ddgryaz